コード例 #1
0
        public void AddBikeClothingCategories(ISeedContext seedContext)
        {
            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBikeClothing)
                .ExtendWith(new Category()
            {
                Name   = "Bike Clothing",
                Parent = seedContext.GetObjectForAlias <Category>(SeedingStrings.CAT_Product),
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBikeClothingBottoms)
                .ExtendWith(new Category()
            {
                Name          = "Biking Bottoms",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBikeClothing),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerTrek, SeedingStrings.ManufacturerSpecialized, SeedingStrings.ManufacturerForceCz)
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBikeClothingTops)
                .ExtendWith(new Category()
            {
                Name          = "Biking Tops",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBikeClothing),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerTrek, SeedingStrings.ManufacturerSpecialized, SeedingStrings.ManufacturerForceCz)
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBikeClothingShoes)
                .ExtendWith(new Category()
            {
                Name          = "Biking Shoes",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBikeClothing),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerBontager, SeedingStrings.ManufacturerShimano)
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBikeClothingHelmets)
                .ExtendWith(new Category()
            {
                Name          = "Biking Helmets",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBikeClothing),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerTrek, SeedingStrings.ManufacturerSpecialized, SeedingStrings.ManufacturerForceCz, SeedingStrings.ManufacturerGiro)
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBikeClothingWindJackets)
                .ExtendWith(new Category()
            {
                Name          = "Biking Wind Jackets",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBikeClothing),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerTrek, SeedingStrings.ManufacturerSpecialized, SeedingStrings.ManufacturerForceCz, SeedingStrings.ManufacturerGiro)
            }).TimeStampNew());
        }
コード例 #2
0
        private void SeedBikeTagTypes(ISeedContext seedContext)
        {
            seedContext.Add(seedContext.BuildWrappedObject <TagType>(SeedingStrings.TagTypeBikeFrame).ExtendWith(new TagType()
            {
                Name       = "Frame",
                Categories = seedContext.GetObjectsForAlias <Category>(SeedingStrings.CategoryBks)
            }.TimeStampNew()));

            seedContext.Add(seedContext.BuildWrappedObject <TagType>(SeedingStrings.TagTypeBikeFrontFork).ExtendWith(new TagType()
            {
                Name       = "Front Fork",
                Categories = seedContext.GetObjectsForAlias <Category>(SeedingStrings.CategoryBks)
            }.TimeStampNew()));

            seedContext.Add(seedContext.BuildWrappedObject <TagType>(SeedingStrings.TagTypeBikeShifters).ExtendWith(new TagType()
            {
                Name       = "Shifters",
                Categories = seedContext.GetObjectsForAlias <Category>(SeedingStrings.CategoryBks)
            }.TimeStampNew()));

            seedContext.Add(seedContext.BuildWrappedObject <TagType>(SeedingStrings.TagTypeFrontDerailleur).ExtendWith(new TagType()
            {
                Name       = "Front Derailleur",
                Categories = seedContext.GetObjectsForAlias <Category>(SeedingStrings.CategoryBks)
            }.TimeStampNew()));

            seedContext.Add(seedContext.BuildWrappedObject <TagType>(SeedingStrings.TagTypeRearDerailleur).ExtendWith(new TagType()
            {
                Name       = "Rear Derailleur",
                Categories = seedContext.GetObjectsForAlias <Category>(SeedingStrings.CategoryBks)
            }.TimeStampNew()));

            seedContext.Add(seedContext.BuildWrappedObject <TagType>(SeedingStrings.TagTypeCrankset).ExtendWith(new TagType()
            {
                Name       = "Crankset",
                Categories = seedContext.GetObjectsForAlias <Category>(SeedingStrings.CategoryBks)
            }.TimeStampNew()));

            seedContext.Add(seedContext.BuildWrappedObject <TagType>(SeedingStrings.TagTypeBottomBracket).ExtendWith(new TagType()
            {
                Name       = "Bottom Bracket",
                Categories = seedContext.GetObjectsForAlias <Category>(SeedingStrings.CategoryBks)
            }.TimeStampNew()));

            seedContext.Add(seedContext.BuildWrappedObject <TagType>(SeedingStrings.TagTypeChain).ExtendWith(new TagType()
            {
                Name       = "Chain",
                Categories = seedContext.GetObjectsForAlias <Category>(SeedingStrings.CategoryBks)
            }.TimeStampNew()));

            seedContext.Add(seedContext.BuildWrappedObject <TagType>(SeedingStrings.TagTypeCassette).ExtendWith(new TagType()
            {
                Name       = "Cassette",
                Categories = seedContext.GetObjectsForAlias <Category>(SeedingStrings.CategoryBks)
            }.TimeStampNew()));
        }
コード例 #3
0
        public void AddBikeCategories(ISeedContext seedContext)
        {
            //TODO : Add parent id for all categories
            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBks)
                .ExtendWith(new Category()
            {
                Name   = "Bikes",
                Parent = seedContext.GetObjectForAlias <Category>(SeedingStrings.CAT_Product),
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBksCross)
                .ExtendWith(new Category()
            {
                Name          = "Cross Bikes",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBks),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerCube, SeedingStrings.ManufacturerGiant, SeedingStrings.ManufacturerGt, SeedingStrings.ManufacturerSpecialized, SeedingStrings.ManufacturerTrek)
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBksHybrid)
                .ExtendWith(new Category()
            {
                Name          = "Hybrid Bikes",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBks),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerCube, SeedingStrings.ManufacturerGiant, SeedingStrings.ManufacturerGt, SeedingStrings.ManufacturerSpecialized, SeedingStrings.ManufacturerTrek)
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBksMountain)
                .ExtendWith(new Category()
            {
                Name          = "Mountain Bikes",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBks),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerCube, SeedingStrings.ManufacturerGiant, SeedingStrings.ManufacturerGt, SeedingStrings.ManufacturerSpecialized, SeedingStrings.ManufacturerTrek)
            }).TimeStampNew());


            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBksRoad)
                .ExtendWith(new Category()
            {
                Name          = "Road Bikes",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBks),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerGiant, SeedingStrings.ManufacturerGt, SeedingStrings.ManufacturerSpecialized, SeedingStrings.ManufacturerTrek)
            }).TimeStampNew());
        }
コード例 #4
0
        private void SeedMainTenant(ISeedContext seedContext)
        {
            seedContext.Add(seedContext.BuildWrappedObject <Tenant>(SeedingStrings.SystemTenantAlias).ExtendWith(new Tenant
            {
                Name = "WebShop",

                BusinessDomains = seedContext.GetObjectsForAlias <BusinessDomain>(SeedingStrings.BusinessDomainBikeClothingStore,
                                                                                  SeedingStrings.BusinessDomainBikeEquipmentStore,
                                                                                  SeedingStrings.BusinessDomainBikeStore)
            }).TimeStampNew().SetSystemFlag().SetClientFlag());
        }
コード例 #5
0
        public void AddBikeEquipmentCategories
            (ISeedContext seedContext)
        {
            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBikeEquipment)
                .ExtendWith(new Category()
            {
                Name   = "Bike Equipment",
                Parent = seedContext.GetObjectForAlias <Category>(SeedingStrings.CAT_Product),
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBikeEquipmentBackGearset)
                .ExtendWith(new Category()
            {
                Name          = "Back Gearsets",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBikeEquipment),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerSram, SeedingStrings.ManufacturerShimano)
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBikeEquipmentFrontGearset)
                .ExtendWith(new Category()
            {
                Name          = "Front Gearsets",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBikeEquipment),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerSram, SeedingStrings.ManufacturerShimano)
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBikeEquipmentForks)
                .ExtendWith(new Category()
            {
                Name          = "Forks",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBikeEquipment),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerFox, SeedingStrings.ManufacturerRockShox, SeedingStrings.ManufacturerSuntour)
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBikeEquipmentInnerTubes)
                .ExtendWith(new Category()
            {
                Name          = "Inner Tubes",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBikeEquipment),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerMichelin, SeedingStrings.ManufacturerContinental, SeedingStrings.ManufacturerBontager),
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBikeEquipmentTires)
                .ExtendWith(new Category()
            {
                Name          = "Tires",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBikeEquipment),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerMichelin, SeedingStrings.ManufacturerContinental, SeedingStrings.ManufacturerBontager),
            }).TimeStampNew());

            seedContext.Add(
                seedContext.BuildWrappedObject <Category>(SeedingStrings.CategoryBikeEquipmentWheels)
                .ExtendWith(new Category()
            {
                Name          = "Wheels",
                Parent        = seedContext.GetObjectForAlias <Category>(SeedingStrings.CategoryBikeEquipment),
                Manufacturers = seedContext.GetObjectsForAlias <Manufacturer>(SeedingStrings.ManufacturerShimano, SeedingStrings.ManufacturerBontager),
            }).TimeStampNew());
        }