Exemple #1
0
        public ActionResult Delete(int id, GreetingViewModel viewModel)
        {
            try
            {
                _greetingService.Delete(id);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View(viewModel));
            }
        }
Exemple #2
0
 public async Task <bool> Delete(int id)
 {
     return(await _greetingService.Delete(id));
 }