public Order GetOrder(int id) { var rep = new EfOrderService(context); var order = rep.GetById(id); order.OrderLines = context.OrderDetail.Where(x => x.OrderId == id).Include(x => x.Product).ToList(); order.OrderLines.ForEach(x => x.Order = null); return(order); }
public void DeleteOrder1(int cid) { var rep = new EfOrderService(context); var order = rep.GetById(cid); if (order != null) { rep.Delete(order); } }