Ejemplo n.º 1
0
        public async Task <IActionResult> PutRate(int id, Rate rate)
        {
            if (id != rate.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> PutTradeMark(int id, TradeMark tradeMark)
        {
            if (id != tradeMark.TradeMarkId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> PutInfoAccount(int id, InfoAccount infoAccount)
        {
            if (id != infoAccount.InfoAccountId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> PutProduct(int id, Product product)
        {
            if (id != product.WatchId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Ejemplo n.º 5
0
        public async Task <IActionResult> PutBillDetail(int id, BillDetail billDetail)
        {
            if (id != billDetail.BillDetailId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }