/// <summary> /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible /// </summary> public AssessmentSubGoal(AssessmentGoal assessmentGoal, int assessmentSubGoalNumber) : this() { // Mark this as a new object by setting primary key with special value this.AssessmentSubGoalID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue(); this.AssessmentGoalID = assessmentGoal.AssessmentGoalID; this.AssessmentGoal = assessmentGoal; assessmentGoal.AssessmentSubGoals.Add(this); this.AssessmentSubGoalNumber = assessmentSubGoalNumber; }
/// <summary> /// Creates a "blank" object of this type and populates primitives with defaults /// </summary> public static AssessmentSubGoal CreateNewBlank(AssessmentGoal assessmentGoal) { return(new AssessmentSubGoal(assessmentGoal, default(int))); }