Пример #1
0
        public async Task <IActionResult> Pager(string tag, int page)
        {
            BlogResult result = new();

            try
            {
                result = await _repo.GetStoriesByTag(tag, _pageSize, page);
            }
            catch (Exception ex)
            {
                _logger.LogError($"Failed to load Tags: {tag} - {ex}");
            }

            return(View("Index", result));
        }
Пример #2
0
 public IActionResult Pager(string tag, int page)
 {
     return(View("Index", _repo.GetStoriesByTag(tag, _pageSize, page)));
 }
Пример #3
0
 public async Task <IActionResult> Pager(string tag, int page)
 {
     return(View("Index", await _repo.GetStoriesByTag(tag, _pageSize, page)));
 }