public IActionResult Index()
        {
            var list = _cityRepos.GetAll().Select(u => new CityVM
            {
                Id      = u.Id,
                Name    = u.Name,
                Country = new CountryVM {
                    Name = u.Country.Name, Flag = "/Uploads/" + u.Country.Flag
                }
            }).ToList();;

            return(View(list));
        }
Пример #2
0
 public IEnumerable <City> GetAll()
 {
     return(Repository.GetAll());
 }