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

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

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

            return(NoContent());
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> PutPricing(int id, Pricing pricing)
        {
            if (id != pricing.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> PutCarCopy(int id, CarCopy carCopy)
        {
            if (id != carCopy.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }