public void removeFromRestonInv(int amountDough)
        {
            Location loc = new Location();

            loc.StoreName   = "Reston";
            loc.LocID       = 2;
            loc.StoredPizza = getRestonInventory() - amountDough;

            _db.Entry(_db.LocationDb.Find(loc.LocID)).CurrentValues.SetValues(Mapper.Map(loc));
        }
示例#2
0
        public async Task <bool> SetPrepared(int id)
        {
            var dbOrder = await _db.Orders.SingleOrDefaultAsync(i => i.OrderId == id);

            dbOrder.PreparedTime = DateTime.Now;

            _db.Entry(dbOrder).State = EntityState.Modified;
            await _db.SaveChangesAsync();

            return(true);
        }