// GET: Customer public ActionResult Index() { IEnumerable <Customer> customers = Repo.GetCustomers(); IEnumerable <CustomerViewModel> items = customers.Select(x => new CustomerViewModel { CustomerId = x.CustomerId, LocationId = x.LocationId, Address = $"{x.Address}, {x.City}, {x.State}, {x.Country}", FirstName = x.FirstName, LastName = x.LastName, }); return(View(items)); }