Пример #1
0
        public async Task <IActionResult> Get(int?page, int?pageSize)
        {
            try
            {
                var urls = await _urlService.GetAll(page, pageSize);

                return(Ok(urls));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Error in Get", new Object[] { page, pageSize });
                throw;
            }
        }
Пример #2
0
        public IActionResult Index()
        {
            var allUrls = urlService.GetAll();

            return(View(allUrls));
        }
Пример #3
0
 public ActionResult <IEnumerable <UrlResult> > Index()
 {
     return(urlService.GetAll());
 }