Esempio n. 1
0
 public static void TestGetCs2(Order o)
 {
     var values = GetCs(o.OrderDetails);
     foreach (var c in values)
     {
         var test = c.Id;
         var test2 = c.OrderDetail.Quantity;
     }
     foreach (var _ in values.Select(c => c.OrderDetail.Order)) ;
 }
Esempio n. 2
0
 public static void TestGetCs(Order o)
 {
     foreach (var c in GetCs(o.OrderDetails))
     {
         var test = c.Id;
         var test2 = c.OrderDetail.Quantity;
     }
 }
Esempio n. 3
0
 public static IEnumerable<Order> GetCustomer(Order o)
 {
     if (o == null)
         return null;
     return o.Customer.Orders.Where(o2 => o2.Id > 10);
 }
Esempio n. 4
0
 public static void TestGetC2(Order o)
 {
     var test = GetC2(o.Customer, o).OrderDetail.UnitPrice;
 }
Esempio n. 5
0
 public static C GetC2(this Customer c, Order o)
 {
     if (c.Id > 10)
         return new C { Id = c.Id, OrderId = o.Id, OrderDetail = c.Orders.First().OrderDetails.First() };
     return new C { Id = c.Id, OrderId = c.Orders2.First().Id, OrderDetail = c.Orders2.First().OrderDetails.First() };
 }