public static TaxonomyLeaf Create() { var taxonomyBranch = TestTaxonomyBranch.Create(); var taxonomyLeaf = TaxonomyLeaf.CreateNewBlank(taxonomyBranch); return(taxonomyLeaf); }
public static ProjectType Create() { var taxonomyBranch = TestTaxonomyBranch.Create(); var projectType = ProjectType.CreateNewBlank(taxonomyBranch); return(projectType); }
/// <summary> /// Create new TaxonomyLeaf and attach it to the given context /// </summary> public static TaxonomyLeaf Create(DatabaseEntities dbContext) { var taxonomyBranch = TestTaxonomyBranch.Create(dbContext); var taxonomyLeaf = new TaxonomyLeaf(taxonomyBranch, MakeTestName("Test Taxonomy Tier One", TaxonomyLeaf.FieldLengths.TaxonomyLeafName)); var newTaxonomyLeaf = taxonomyLeaf; dbContext.AllTaxonomyLeafs.Add(newTaxonomyLeaf); return(newTaxonomyLeaf); }
/// <summary> /// Create new ProjectType and attach it to the given context /// </summary> public static ProjectType Create(DatabaseEntities dbContext) { var taxonomyBranch = TestTaxonomyBranch.Create(dbContext); string projectTypeTestName = MakeTestName("Test Taxonomy Tier One", ProjectType.FieldLengths.ProjectTypeName); var projectType = new ProjectType(taxonomyBranch, projectTypeTestName, false); var newProjectType = projectType; dbContext.ProjectTypes.Add(newProjectType); return(newProjectType); }