Пример #1
0
        public static CaseExampleViewModel Create(IRepository <CaseStudy> caseStudyRepository, string site)
        {
            Check.Require(caseStudyRepository != null, "caseStudyRepository is required.");

            var viewModel = new CaseExampleViewModel()
            {
                CaseStudies    = caseStudyRepository.Queryable.Where(a => a.IsPublic && a.Seminar.Site.Id == site).OrderBy(a => a.Seminar.Year).ThenBy(a => a.Name),
                CurrentSeminar = SiteService.GetLatestSeminar(site)
            };

            return(viewModel);
        }
Пример #2
0
        public static CaseExampleViewModel Create(IRepository<CaseStudy> caseStudyRepository, string site)
        {
            Check.Require(caseStudyRepository != null, "caseStudyRepository is required.");

            var viewModel = new CaseExampleViewModel()
                                {
                                    CaseStudies = caseStudyRepository.Queryable.Where(a => a.IsPublic && a.Seminar.Site.Id == site).OrderBy(a => a.Seminar.Year).ThenBy(a => a.Name),
                                    CurrentSeminar = SiteService.GetLatestSeminar(site)
                                };

            return viewModel;
        }