public async Task <IActionResult> Delete(Guid id) { if (ResponseHasErrors(await _todoAppService.Remove(id))) { return(View(await _todoAppService.GetById(id))); } ViewBag.Sucess = "Task removed"; return(RedirectToAction("Index")); }
public void Delete(int id) { try { if (id != 0) { _todoApp.Remove(_todoApp.GetById(id)); } } catch (Exception ex) { throw ex; } }
public async Task <IActionResult> Delete(Guid id) { return(CustomResponse(await _todoAppService.Remove(id))); }
public IActionResult Remove(string title) { TodoAppService.Remove(title); return(View("Index", TodoAppService.GetAll())); }