public async Task <IActionResult> GetPagedResults([FromBody] SearchObjectModel searchObjectModel) { if (!ModelState.IsValid) { return(ValidationProblem(ModelState)); } (IEnumerable <WebSite> result, int count) = await _webSiteService.GetWebSites(_searchObjectMapper.ModelToEntity(searchObjectModel)); var modelResults = result.Select(x => _webSiteMapper.EntityToModel(x)).ToArray(); return(Ok(new PagedResult { WebSites = modelResults, TotalCount = count })); }
public IActionResult WebSiteList() { var model = _webSiteService.GetWebSites().ToList(); return(View(model)); }