public IActionResult Index() { var role = gallerysRepository.Gets(); var result = role.Select(a => new GalleryModel() { Id = a.Id, Name = a.Name, Url = a.Url }).ToList(); return(View(result)); }
public List <Gallery> GetGallerys() { return(gallerysRepository.Gets().ToList()); }