public IActionResult Delete(int id)
        {
            var entity = _todoManager.Get(id);

            if (entity == null)
            {
                return(NotFound());
            }

            _todoManager.Delete(id);

            return(NoContent());
        }
Esempio n. 2
0
 public async Task <ApiResponse> Delete(long id)
 => await _todoManager.Delete(id);
Esempio n. 3
0
        public IActionResult DeleteTodo([DataSourceRequest] DataSourceRequest request, UserTodoItemViewModel model, string userId)
        {
            todoManager.Delete(model);

            return(Json(new[] { model }.ToDataSourceResult(request, ModelState)));
        }