Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 public IEnumerable <City> GetAll()
 {
     return(Repository.GetAll());
 }