/// <summary> /// Enum types are equal by primary key /// </summary> public bool Equals(ProjectRelevantCostTypeGroup other) { if (other == null) { return(false); } return(other.ProjectRelevantCostTypeGroupID == ProjectRelevantCostTypeGroupID); }
/// <summary> /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible /// </summary> public ProjectRelevantCostType(Project project, CostType costType, ProjectRelevantCostTypeGroup projectRelevantCostTypeGroup) : this() { // Mark this as a new object by setting primary key with special value this.ProjectRelevantCostTypeID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue(); this.ProjectID = project.ProjectID; this.Project = project; project.ProjectRelevantCostTypes.Add(this); this.CostTypeID = costType.CostTypeID; this.CostType = costType; costType.ProjectRelevantCostTypes.Add(this); this.ProjectRelevantCostTypeGroupID = projectRelevantCostTypeGroup.ProjectRelevantCostTypeGroupID; }
/// <summary> /// Creates a "blank" object of this type and populates primitives with defaults /// </summary> public static ProjectRelevantCostTypeUpdate CreateNewBlank(ProjectUpdateBatch projectUpdateBatch, CostType costType, ProjectRelevantCostTypeGroup projectRelevantCostTypeGroup) { return(new ProjectRelevantCostTypeUpdate(projectUpdateBatch, costType, projectRelevantCostTypeGroup)); }
/// <summary> /// Creates a "blank" object of this type and populates primitives with defaults /// </summary> public static ProjectRelevantCostType CreateNewBlank(Project project, CostType costType, ProjectRelevantCostTypeGroup projectRelevantCostTypeGroup) { return(new ProjectRelevantCostType(project, costType, projectRelevantCostTypeGroup)); }