public OrderDetails Add(OrderDetails orderDetails)
 {
     //orderDetails.OrderDetailsId = _orderDetailsList.Max(e => e.OrderDetailsId) + 1;
     context.OrderDetails.Add(orderDetails);
     context.SaveChanges();
     return(orderDetails);
 }
Example #2
0
 public bool Add(Orders orders)
 {
     try
     {
         context.Orders.Add(orders);
         context.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }