Example #1
0
        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());
            }
        }
Example #2
0
        public async Task <IActionResult> Archive([FromServices] PostArchiveService postArchiveService)
        {
            var archives = await postArchiveService.ListAsync();

            return(View(archives));
        }