public void ChangeOrderStatus(Order order, string status)
 {
     if (order != null)
     {
         order.Condidtion = status;
         _bookstoreDbContext.Update(order);
         _bookstoreDbContext.SaveChanges();
     }
 }
Example #2
0
        public void IncreaseInStorage(int bookId)
        {
            var storage = _bookstoreDbContext.Storages.FirstOrDefault(i => i.BookId == bookId);

            if (storage != null)
            {
                storage.Amount++;
                _bookstoreDbContext.Update(storage);
                _bookstoreDbContext.SaveChanges();
            }
        }