Пример #1
0
        public static void CompleteOrder(Guid orderId)
        {
            var db    = new PapaBobsDBEntities();
            var order = db.Orders.FirstOrDefault(p => p.OrderId == orderId);

            order.Completed_ = true;
            db.SaveChanges();
        }
Пример #2
0
        public static void CreateOrder(DTO.OrderDTO orderDTO)
        {
            var db = new PapaBobsDBEntities();

            var order = convertToEntity(orderDTO);

            db.Orders.Add(order);
            db.SaveChanges();
        }