public IActionResult Delete(int id) { var entity = _todoManager.Get(id); if (entity == null) { return(NotFound()); } _todoManager.Delete(id); return(NoContent()); }
public async Task <ApiResponse> Delete(long id) => await _todoManager.Delete(id);
public IActionResult DeleteTodo([DataSourceRequest] DataSourceRequest request, UserTodoItemViewModel model, string userId) { todoManager.Delete(model); return(Json(new[] { model }.ToDataSourceResult(request, ModelState))); }