Esempio n. 1
0
        public async Task <IActionResult> PutPipe(long id, Pipe pipe)
        {
            if (id != pipe.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Esempio n. 2
0
        public async Task <IActionResult> PutFactorys(long id, Factorys factorys)
        {
            if (id != factorys.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }