public ActionResult Index() { var randomProfiles = _repository.GetRandomProfiles(6); var results = from p in randomProfiles select new RandomProfileViewModel { PhotoUrl = p.Photos.Where(i => i.IsMain).FirstOrDefault().Url, LookingFor = p.LookingFor, MemberName = p.Member.MemberName }; return(View(results.ToList())); }
public ActionResult Index() { var randomProfiles = _repository.GetRandomProfiles(6); return(View(randomProfiles)); }