public static void CompleteOrder(Guid orderId) { var db = new PapaBobDBEntities(); var order = db.Orders.FirstOrDefault(p => p.OrderId == orderId); order.CompletedFlag = true; db.SaveChanges(); }
public static void CreateOrder(DTO.OrderDTO orderDTO) { var db = new PapaBobDBEntities(); var order = convertToEntity(orderDTO); db.Orders.Add(order); db.SaveChanges(); }