public static void CompleteOrder(Guid orderId) { var db = new papaBobsDBEntities1(); var order = db.tbl_orders.FirstOrDefault(p => p.orderID == orderId); order.completed = true; db.SaveChanges(); }
public static void CreateOrder(papaBobs.DTO.OrderDTO orderDTO) { var db = new papaBobsDBEntities1(); var order = convertToEntity(orderDTO); db.tbl_orders.Add(order); db.SaveChanges(); }