/// <summary> /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible /// </summary> public CustomPage(string customPageDisplayName, string customPageVanityUrl, FirmaMenuItem firmaMenuItem) : 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.FirmaMenuItemID = firmaMenuItem.FirmaMenuItemID; }
/// <summary> /// Enum types are equal by primary key /// </summary> public bool Equals(FirmaMenuItem other) { if (other == null) { return(false); } return(other.FirmaMenuItemID == FirmaMenuItemID); }
/// <summary> /// Creates a "blank" object of this type and populates primitives with defaults /// </summary> public static CustomPage CreateNewBlank(FirmaMenuItem firmaMenuItem) { return(new CustomPage(default(string), default(string), firmaMenuItem)); }