public DinnerNow.Business.Data.RestaurantOrder[] GetPreOrderDetails(string RestaurantName, string Deliverytype, string restaurantownerid)
{
var orderItems = from od in db.OrderDetails where od.RestaurantIndex_Id == restaurantOrder.RestaurantIndex_Id orderby od.OrderIndex_Id descending
restaurantOrder.OrderIndex_Id
select new
{
OrderDetailId = od.OrderDetailId
};. Distinct().OrderByDescending(x=>x.RestaurantIndex_Id);
return orderitembyrestaurant.ToArray();
}
its working fine thanks all
[edit]pre tag for C# code added - PES[/edit]