public IEnumerable <GetHomePage> GetHomePage() { List <GetHomePage> cars = new List <GetHomePage>(); using (_ctx) { var featuredCars = _ctx.GetAllFeatured(); foreach (var featured in featuredCars) { if (featured.IsPurchased != true) { GetHomePage hp = new GetHomePage(); hp.CarId = featured.CarId; hp.Year = featured.Year; hp.MakeName = featured.MakeName; hp.ModelName = featured.ModelName; hp.SalePrice = featured.SalePrice; hp.ImageFileName = featured.ImageFileName; cars.Add(hp); } } var listOfSpecials = GetSpecials(); foreach (var s in listOfSpecials) { GetHomePage hp = new GetHomePage(); hp.SpecialId = s.SpecialId; hp.SpecialTitle = s.SpecialTitle; hp.SpecialDescription = s.SpecialDescription; cars.Add(hp); } } return(cars); }