// GET: Location public ActionResult Index() { var locations = db.GetLocations(); foreach (var location in locations) { l = new Models.Location(); l.Locationid = location.Locationid; l.Street1 = location.Street1; l.Street2 = location.Street2; l.Num++; l.City = location.City; l.State = location.State; l.Country = location.Country; l.Zipcode = location.Zipcode; LocationList.Add(l); } return(View(LocationList)); }