예제 #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());
 }