Beispiel #1
0
        GetSubSections(IEnumerable <IEntityCommonInfo> entities)
        {
            var subSections = entities.Select(ss =>
                                              EntityWithList.New(ss,
                                                                 SiteObjectService.GetSingleRelation <Course>(ss)
                                                                 .IsActive().Cast <IEntityCommonInfo>().ToList()
                                                                 .Concat(SiteObjectService.GetSingleRelation <Product>(ss)
                                                                         .IsActive()
                                                                         .ByWebOrder()
                                                                         .ToList()
                                                                         )
                                                                 .Concat(SiteObjectService.GetSingleRelation <Vendor>(ss)
                                                                         .IsActive()
                                                                         .ByWebOrder()
                                                                         .ToList()
                                                                         )
                                                                 .Concat(SiteObjectService.GetSingleRelation <Profession>(ss)
                                                                         .IsActive()
                                                                         .ByWebOrder()
                                                                         .ToList()
                                                                         )
                                                                 .Concat(SiteObjectService.GetSingleRelation <SiteTerm>(ss)
                                                                         .IsActive()
                                                                         .ByWebOrder()
                                                                         .ToList()
                                                                         )
                                                                 )
                                              ).ToList();

            return(subSections);
        }
Beispiel #2
0
        GetEntityWithTags2(object entity)
        {
            var entityWithTags
                = new List <EntityWithList <IEntityCommonInfo, IEntityCommonInfo> >();
            var activeSections = SiteObjectService
                                 .GetSingleRelation <Section>(entity)
                                 .IsActive().ToList();
            var activeVendors = SiteObjectService
                                .GetSingleRelation <Vendor>(entity)
                                .IsActive().ToList();
            var activeProducts = SiteObjectService
                                 .GetSingleRelation <Product>(entity)
                                 .IsActive().ToList();
            var activeProfessions = SiteObjectService
                                    .GetSingleRelation <Profession>(entity)
                                    .IsActive().ToList();
            var activeSiteTerm = SiteObjectService
                                 .GetSingleRelation <SiteTerm>(entity)
                                 .IsActive().ToList();

            entityWithTags.AddRange(
                GetSubSections(activeSections));
            entityWithTags.AddRange(
                GetSubSections(activeSiteTerm));
            entityWithTags.AddRange(
                GetSubSections(activeVendors));
            entityWithTags.AddRange(
                GetSubSections(activeProfessions));
            entityWithTags.AddRange(
                GetSubSections(activeProducts));
            return(entityWithTags);
        }