public async Task <IActionResult> PutApplication([FromRoute] int id, [FromBody] Application application) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != application.AppId) { return(BadRequest()); } _context.Entry(application).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ApplicationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }