public ActionResult Delete(int id, GreetingViewModel viewModel) { try { _greetingService.Delete(id); return(RedirectToAction("Index")); } catch { return(View(viewModel)); } }
public async Task <bool> Delete(int id) { return(await _greetingService.Delete(id)); }