public async Task <IActionResult> PutAccountpayment2177(int id, Accountpayment2177 accountpayment2177)
        {
            if (id != accountpayment2177.Accountid)
            {
                return(BadRequest());
            }

            _context.Entry(accountpayment2177).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!Accountpayment2177Exists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutLocation2177(string id, Location2177 l)
        {
            if (id != l.Locationid)
            {
                return(BadRequest());
            }

            // _context.Entry(location2177).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!Location2177Exists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutPurchaseorder2177(int id, Purchaseorder2177 purchaseorder2177)
        {
            if (id != purchaseorder2177.Productid)
            {
                return(BadRequest());
            }

            _context.Entry(purchaseorder2177).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!Purchaseorder2177Exists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Esempio n. 4
0
        public async Task <ActionResult <Order2177> > DeleteOrder2177(int id)
        {
            var order2177 = await _context.Order2177.FindAsync(id);

            if (order2177 == null)
            {
                return(NotFound());
            }

            _context.Order2177.Remove(order2177);
            await _context.SaveChangesAsync();

            return(order2177);
        }