public async Task <IActionResult> DeleteConfirmed(int id) { try { await _moduleAppService.DeleteAsync(id); } catch (Exception ex) { return(View(ex.Message)); //throw; } return(RedirectToAction(nameof(Index))); }