public async Task <IActionResult> PutTODOTask(int id, TODOTask tODOTask) { if (id != tODOTask.Id) { return(BadRequest()); } _context.Entry(tODOTask).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TODOTaskExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutUserDetails(int id, UserDetails userDetails) { if (id != userDetails.Id) { return(BadRequest()); } _context.Entry(userDetails).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserDetailsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }