public IActionResult Index() { var sites = _site.GetAll().Select(site => new SiteDetailModel { Id = site.Id, Name = site.Name, ImageUrl = site.ImageUrl }); var model = new SiteIndexModel() { Sites = sites }; return(View(model)); }