public override int GetHashCode() { int hash = 1; if (ResourceName.Length != 0) { hash ^= ResourceName.GetHashCode(); } if (TaxonomyType != global::Google.Ads.GoogleAds.V3.Enums.UserInterestTaxonomyTypeEnum.Types.UserInterestTaxonomyType.Unspecified) { hash ^= TaxonomyType.GetHashCode(); } if (userInterestId_ != null) { hash ^= UserInterestId.GetHashCode(); } if (name_ != null) { hash ^= Name.GetHashCode(); } if (userInterestParent_ != null) { hash ^= UserInterestParent.GetHashCode(); } if (launchedToAll_ != null) { hash ^= LaunchedToAll.GetHashCode(); } hash ^= availabilities_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public async Task SeedAsync(DbContext context) { var entityTypeSet = context.Set <TaxonomyType>(); var desingTheme = await entityTypeSet.FirstOrDefaultAsync(o => o.Name == HouseStyle.Name); if (desingTheme == null) { HouseStyle = entityTypeSet.Add(HouseStyle).Entity; } else { HouseStyle = desingTheme; } Apartment.TaxonomyTypeId = HouseStyle.Id; LandedHouse.TaxonomyTypeId = HouseStyle.Id; var taxonomySet = context.Set <Taxonomy>(); Apartment = await SeedEntityAsync(taxonomySet, Apartment); LandedHouse = await SeedEntityAsync(taxonomySet, LandedHouse); await context.SaveChangesAsync(); }
public TaxonomyTypeManager(EntityTypeManager entityTypeManager, ITaxonomyHelper taxonomyManager, UserManager <User> userManager) { var supperUser = userManager.FindByNameAsync(AppKey.SupperAdminUserName).Result; ConstructionCategory = taxonomyManager.RegisterTaxonomyType( entityTypeManager.Construction, "construction-category", new Dictionary <string, string> { { "title", "Category" }, }, supperUser ); ProjectCategory = taxonomyManager.RegisterTaxonomyType( entityTypeManager.Project, "project-category", new Dictionary <string, string> { { "title", "Category" }, }, supperUser ); CollectionCategory = taxonomyManager.RegisterTaxonomyType( entityTypeManager.Collection, "collection-category", new Dictionary <string, string> { { "title", "Category" }, }, supperUser ); }
public override int GetHashCode() { int hash = 1; if (ResourceName.Length != 0) { hash ^= ResourceName.GetHashCode(); } if (TaxonomyType != 0) { hash ^= TaxonomyType.GetHashCode(); } if (userInterestId_ != null) { hash ^= UserInterestId.GetHashCode(); } if (name_ != null) { hash ^= Name.GetHashCode(); } if (userInterestParent_ != null) { hash ^= UserInterestParent.GetHashCode(); } if (launchedToAll_ != null) { hash ^= LaunchedToAll.GetHashCode(); } hash ^= availabilities_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public async Task SeedAsync(DbContext context) { var entityTypeSet = context.Set <TaxonomyType>(); var packageIncludedItem = await entityTypeSet.FirstOrDefaultAsync(o => o.Name == PackageFunitureIncludedItem.Name); if (packageIncludedItem == null) { PackageFunitureIncludedItem = entityTypeSet.Add(PackageFunitureIncludedItem).Entity; } else { PackageFunitureIncludedItem = packageIncludedItem; } LivingRoom.TaxonomyTypeId = PackageFunitureIncludedItem.Id; DiningRoom.TaxonomyTypeId = PackageFunitureIncludedItem.Id; BedRoom.TaxonomyTypeId = PackageFunitureIncludedItem.Id; KidRoom.TaxonomyTypeId = PackageFunitureIncludedItem.Id; var taxonomySet = context.Set <TaxonomyEntity>(); LivingRoom = taxonomySet.SeedEntity(LivingRoom); DiningRoom = taxonomySet.SeedEntity(DiningRoom); BedRoom = taxonomySet.SeedEntity(BedRoom); KidRoom = taxonomySet.SeedEntity(KidRoom); await context.SaveChangesAsync(); }
private void ConfigureAsTaxonomy(TaxonomyType specificType, string termSetName) { taxonomyType = specificType; taxonomyTermSetName = termSetName; fieldCreator = CreateTaxonomyField; shouldUpdateAsPartOfCreation = false; }
public async Task SeedAsync(DbContext context) { var entityTypeSet = context.Set <TaxonomyType>(); ProjectType = entityTypeSet.SeedEntity(ProjectType); var taxonomySet = context.Set <TaxonomyEntity>(); Apartment.TaxonomyTypeId = ProjectType.Id; Apartment = taxonomySet.SeedEntity(Apartment); await context.SaveChangesAsync(); }
public async Task SeedAsync(DbContext dbConext) { var taxonomyTypeSet = dbConext.Set <TaxonomyType>(); ProductBrand = taxonomyTypeSet.SeedEntity(ProductBrand); var taxonomySet = dbConext.Set <TaxonomyEntity>(); Uncategorized.TaxonomyTypeId = ProductBrand.Id; Uncategorized = taxonomySet.SeedEntity(Uncategorized); await dbConext.SaveChangesAsync(); }
public List <SelectListItem> GetTaxonomySelectListItem(TaxonomyType taxonomy) { return((from tx in db.TermTaxonomy join te in db.Term on tx.TermId equals te.Id where tx.TaxonomyId == (int)TaxonomyType.BankName && tx.CompanyId == Guid.Empty.ToString() && te.CompanyId == Guid.Empty.ToString() && te.TaxonomyId == (int)taxonomy select new SelectListItem { Text = te.Name, Value = te.Id.ToString() + "|" + te.Name, //Selected = termId != 0 && termId == te.Id }).ToList()); }
public async Task SeedAsync(DbContext context) { var entityTypeSet = context.Set <TaxonomyType>(); ProductType = entityTypeSet.SeedEntity(ProductType); var taxonomySet = context.Set <TaxonomyEntity>(); Uncategorized.TaxonomyTypeId = ProductType.Id; Uncategorized = taxonomySet.SeedEntity(Uncategorized); await context.SaveChangesAsync(); }
public async Task SeedAsync(DbContext dbConext) { var entityTypeSet = dbConext.Set <TaxonomyType>(); ProjectStatus = entityTypeSet.SeedEntity(ProjectStatus); UnderConstruction.TaxonomyTypeId = ProjectStatus.Id; Finish.TaxonomyTypeId = ProjectStatus.Id; var taxonomySet = dbConext.Set <Taxonomy>(); UnderConstruction = taxonomySet.SeedEntity(UnderConstruction); Finish = taxonomySet.SeedEntity(Finish); await dbConext.SaveChangesAsync(); }
public async Task SeedAsync(DbContext context) { var entityTypeSet = context.Set <TaxonomyType>(); DesignTheme = entityTypeSet.SeedEntity(DesignTheme); Classic.TaxonomyTypeId = DesignTheme.Id; Modern.TaxonomyTypeId = DesignTheme.Id; var taxonomySet = context.Set <TaxonomyEntity>(); Classic = taxonomySet.SeedEntity(Classic); Modern = taxonomySet.SeedEntity(Modern); await context.SaveChangesAsync(); }
public TaxonomyTypeManager(EntityTypeManager entityTypeManager, ITaxonomyHelper taxonomyManager, UserManager <User> userManager) { var supperUser = userManager.FindByNameAsync(AppKey.SupperAdminUserName).Result; PostCategory = taxonomyManager.RegisterTaxonomyType( entityTypeManager.Liblary, "liblary-blog-category", new Dictionary <string, string> { { "title", "Category" }, }, supperUser); PostCategory = taxonomyManager.RegisterTaxonomyType( entityTypeManager.Liblary, "liblary-blog-tag", new Dictionary <string, string> { { "title", "Tag" }, }, supperUser); }
public async Task SeedAsync(DbContext context) { var entityTypeSet = context.Set <TaxonomyType>(); var packageIncludedItem = await entityTypeSet.FirstOrDefaultAsync(o => o.Name == PackageIncludedItem.Name); if (packageIncludedItem == null) { PackageIncludedItem = entityTypeSet.Add(PackageIncludedItem).Entity; } else { PackageIncludedItem = packageIncludedItem; } Carpentry.TaxonomyTypeId = PackageIncludedItem.Id; FeatureWall.TaxonomyTypeId = PackageIncludedItem.Id; Plumbing.TaxonomyTypeId = PackageIncludedItem.Id; ElectricalWiring.TaxonomyTypeId = PackageIncludedItem.Id; Flooring.TaxonomyTypeId = PackageIncludedItem.Id; FalseCeiling.TaxonomyTypeId = PackageIncludedItem.Id; Decoration.TaxonomyTypeId = PackageIncludedItem.Id; Design.TaxonomyTypeId = PackageIncludedItem.Id; Painting.TaxonomyTypeId = PackageIncludedItem.Id; var taxonomySet = context.Set <TaxonomyEntity>(); Carpentry = taxonomySet.SeedEntity(Carpentry); FeatureWall = taxonomySet.SeedEntity(FeatureWall); Plumbing = taxonomySet.SeedEntity(Plumbing); ElectricalWiring = taxonomySet.SeedEntity(ElectricalWiring); Flooring = taxonomySet.SeedEntity(Flooring); FalseCeiling = taxonomySet.SeedEntity(FalseCeiling); Decoration = taxonomySet.SeedEntity(Decoration); Design = taxonomySet.SeedEntity(Design); Painting = taxonomySet.SeedEntity(Painting); await context.SaveChangesAsync(); }
public TaxonomyType RegisterTaxonomyType(EntityType entityType, string name, Dictionary <string, string> detailDictionary, User byUser) { var taxType = _taxTypeEntityHelper.Entity(name); if (taxType == null) { taxType = new TaxonomyType { Name = _taxTypeEntityHelper.GenerateEntityName(name), EntityType = entityType }; _taxTypeEntityHelper.Add(taxType); _taxTypeEntityHelper.CreateDetails(taxType, detailDictionary, byUser); } else { _taxTypeEntityHelper.UpdateDetails(taxType, detailDictionary, byUser); } Save(); return(taxType); }
/// <summary> /// /// </summary> public async Task <IActionResult> Index(TaxonomyType type = TaxonomyType.Category) { var posts = await _taxonomyService.SearchAsync(term : "", type : type, sortOrder : SortOrder.Desc); return(View(posts)); }
public Taxonomy(TaxonomyType name, Label[] labelArray) { this.Name = name; this.LabelArray = labelArray; }
public TaxonomyViewModel(TaxonomyType taxonomyType) { _taxonomyType = taxonomyType; TermList = new List <Term>(); }
/// <summary> /// /// </summary> public async Task <IEnumerable <Taxonomy> > GetAllAsync(TaxonomyType type) { return(await _taxonomies.Find(t => t.Type == type).ToListAsync()); }
private async Task <IEnumerable <Models.Taxonomy> > GetAllTaxonomies(string groupId, TaxonomyType type) { var result = new List <Models.Taxonomy>(); var taxonomies = await _db.Taxonomies .AsNoTracking() .Where(t => t.GroupId == groupId && t.Type == type) .OrderBy(t => t.Title) .ToListAsync() .ConfigureAwait(false); foreach (var taxonomy in taxonomies) { result.Add(new Models.Taxonomy { Id = taxonomy.Id, Title = taxonomy.Title, Slug = taxonomy.Slug, Type = taxonomy.Type == TaxonomyType.Category ? Models.TaxonomyType.Category : Models.TaxonomyType.Tag }); } return(result); }