public IActionResult Delete(Guid id, string type) { var destView = string.IsNullOrEmpty(type) ? "index": type; _todoRepo.DeleteById(id); return(RedirectToAction(destView)); }
public async Task <ActionResult> Delete(Guid id, FormCollection collection) { try { await _todoRepository.DeleteById(id); return(RedirectToAction("Index")); } catch { return(View()); } }
public IActionResult DeleteList(string id) { toDoLisToDoRepository.DeleteById(id); return(NoContent()); }