/// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public FundingSourceCustomAttributeValue(FundingSourceCustomAttribute fundingSourceCustomAttribute, string attributeValue) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.FundingSourceCustomAttributeValueID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.FundingSourceCustomAttributeID      = fundingSourceCustomAttribute.FundingSourceCustomAttributeID;
     this.FundingSourceCustomAttribute        = fundingSourceCustomAttribute;
     fundingSourceCustomAttribute.FundingSourceCustomAttributeValues.Add(this);
     this.AttributeValue = attributeValue;
 }
 public FundingSourceCustomAttributeSimple(FundingSourceCustomAttribute fundingSourceCustomAttribute)
 {
     FundingSourceCustomAttributeTypeID = fundingSourceCustomAttribute.FundingSourceCustomAttributeTypeID;
     FundingSourceCustomAttributeValues = fundingSourceCustomAttribute.GetCustomAttributeValues()
                                          .Select(y =>
                                                  y.FundingSourceCustomAttribute.FundingSourceCustomAttributeType.FundingSourceCustomAttributeDataType ==
                                                  FundingSourceCustomAttributeDataType.DateTime
                 ? DateTime.Parse(y.AttributeValue).ToShortDateString()
                 : y.AttributeValue)
                                          .ToList();
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static FundingSourceCustomAttributeValue CreateNewBlank(FundingSourceCustomAttribute fundingSourceCustomAttribute)
 {
     return(new FundingSourceCustomAttributeValue(fundingSourceCustomAttribute, default(string)));
 }