Ejemplo n.º 1
0
        public async Task <IActionResult> PutFSItem(long id, FSItemDTO fSItemDTO)
        {
            if (id != fSItemDTO.Id)
            {
                return(BadRequest());
            }

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

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException) when(!FSItemExists(id))
            {
                return(NotFound());
            }

            return(NoContent());
        }