/// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(CustomAttributeTypePurpose other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.CustomAttributeTypePurposeID == CustomAttributeTypePurposeID);
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static CustomAttributeType CreateNewBlank(CustomAttributeDataType customAttributeDataType, CustomAttributeTypePurpose customAttributeTypePurpose)
 {
     return(new CustomAttributeType(default(string), customAttributeDataType, default(bool), customAttributeTypePurpose));
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public CustomAttributeType(string customAttributeTypeName, CustomAttributeDataType customAttributeDataType, bool isRequired, CustomAttributeTypePurpose customAttributeTypePurpose) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.CustomAttributeTypeID     = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.CustomAttributeTypeName   = customAttributeTypeName;
     this.CustomAttributeDataTypeID = customAttributeDataType.CustomAttributeDataTypeID;
     this.IsRequired = isRequired;
     this.CustomAttributeTypePurposeID = customAttributeTypePurpose.CustomAttributeTypePurposeID;
 }