public async Task <IActionResult> PutEntry(int id, Entry entry) { if (id != entry.Id) { return(BadRequest()); } _context.Entry(entry).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EntryExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }