コード例 #1
0
        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()));
        }
コード例 #2
0
        public ActionResult Index()
        {
            var randomProfiles = _repository.GetRandomProfiles(6);

            return(View(randomProfiles));
        }