/// <summary> /// Enum types are equal by primary key /// </summary> public bool Equals(CustomPageDisplayType other) { if (other == null) { return(false); } return(other.CustomPageDisplayTypeID == CustomPageDisplayTypeID); }
/// <summary> /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible /// </summary> public CustomPage(string customPageDisplayName, string customPageVanityUrl, CustomPageDisplayType customPageDisplayType, CustomPageNavigationSection customPageNavigationSection) : this() { // Mark this as a new object by setting primary key with special value this.CustomPageID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue(); this.CustomPageDisplayName = customPageDisplayName; this.CustomPageVanityUrl = customPageVanityUrl; this.CustomPageDisplayTypeID = customPageDisplayType.CustomPageDisplayTypeID; this.CustomPageNavigationSectionID = customPageNavigationSection.CustomPageNavigationSectionID; }
/// <summary> /// Creates a "blank" object of this type and populates primitives with defaults /// </summary> public static CustomPage CreateNewBlank(CustomPageDisplayType customPageDisplayType, CustomPageNavigationSection customPageNavigationSection) { return(new CustomPage(default(string), default(string), customPageDisplayType, customPageNavigationSection)); }