public async Task <IActionResult> Index() { try { var archives = await _postArchiveService.ListAsync(); return(View(archives)); } catch (Exception e) { Logger.LogError(e, e.Message); SetFriendlyErrorMessage(); return(View()); } }
public async Task <IActionResult> Archive([FromServices] PostArchiveService postArchiveService) { var archives = await postArchiveService.ListAsync(); return(View(archives)); }