Пример #1
0
 public OrderState GetOrderState(int orderID, byte state)
 {
     return(OrderStates
            .Include(col => col.StateNavigation)
            .Where(x => x.OrderId == orderID)
            .Where(x => x.State == state).FirstOrDefault());
 }
Пример #2
0
 public IEnumerable <OrderState> GetOrderStates(int orderID)
 {
     return(OrderStates
            .Include(col => col.StateNavigation)
            .Where(x => x.OrderId == orderID)
            .OrderBy(x => x.State)); //to samo co po date ale szybciej
 }