public static DivisionIndexViewModel Build(IEnumerable <PublicDivision> publicDivisions) { return(new DivisionIndexViewModel { Divisions = publicDivisions.Select(pd => DivisionItemViewModel.Build(pd)), Breadcrumb = new Breadcrumb { BreadcrumbHelper.GetBreadcrumbRootItem(true) } }); }
public static HomeIndexViewModel Build(IEnumerable <PublicDivision> publicDivisions, IEnumerable <XtracurDivision> xtracurDivisions) { return(new HomeIndexViewModel { Divisions = publicDivisions.Select(pd => DivisionItemViewModel.Build(pd)), XtracurDivisions = xtracurDivisions .Where(xd => xd.Alias != "PhysTraining") .Select(xd => XtracurDivisionItemViewModel.Build(xd)), PhysTrainingDivisions = xtracurDivisions .Where(xd => xd.Alias == "PhysTraining") .Select(xd => XtracurDivisionItemViewModel.Build(xd)), Breadcrumb = new Breadcrumb { BreadcrumbHelper.GetBreadcrumbRootItem(true) } }); }