/// <summary> /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible /// </summary> public PersonSettingGridColumn(PersonSettingGridTable personSettingGridTable, string columnName, int sortOrder) : this() { // Mark this as a new object by setting primary key with special value this.PersonSettingGridColumnID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue(); this.PersonSettingGridTableID = personSettingGridTable.PersonSettingGridTableID; this.PersonSettingGridTable = personSettingGridTable; personSettingGridTable.PersonSettingGridColumns.Add(this); this.ColumnName = columnName; this.SortOrder = sortOrder; }
/// <summary> /// Creates a "blank" object of this type and populates primitives with defaults /// </summary> public static PersonSettingGridColumn CreateNewBlank(PersonSettingGridTable personSettingGridTable) { return(new PersonSettingGridColumn(personSettingGridTable, default(string), default(int))); }