public async Task <IActionResult> PutCategorys(int id, Categorys categorys) { if (id != categorys.Id) { return(BadRequest()); } _context.Entry(categorys).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CategorysExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutTodolist(int id, Todolist todolist) { if (id != todolist.Id) { return(BadRequest()); } _context.Entry(todolist).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TodolistExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }