public void EditOrders(Library.Orders Orders)
 {
     if (_db.Orders.Find(Orders.OrderId) != null)
     {
         _db.Orders.Update(OrdersMapper.Map(Orders));
     }
 }
        public void PlaceOrder(PizzaBoxContext PizzaBox, Library.Orders order)
        {
            Orders orders = new Orders()
            {
                StoreId    = order.StoreId,
                PlaceDate  = DateTime.Now,
                EmployeeId = 1,//for website and testing
                CustomerId = order.CustomerId,
                TotalPrice = order.TotalCost
            };

            using (var unitofWork = new PizzaBox.Storing.UnitofWork(PizzaBox))
            {
                unitofWork.Order.Add(orders);
                PizzaBox.SaveChanges();
            }
        }
 public void AddOrders(Library.Orders Orders)
 {
     _db.Orders.Add(OrdersMapper.Map(Orders));
 }