Beispiel #1
0
 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"));
 }
Beispiel #2
0
 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)));
 }
Beispiel #4
0
 public IActionResult Remove(string title)
 {
     TodoAppService.Remove(title);
     return(View("Index", TodoAppService.GetAll()));
 }