/// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(FundingEventType other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.FundingEventTypeID == FundingEventTypeID);
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public FundingEvent(TreatmentBMP treatmentBMP, FundingEventType fundingEventType, int year) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.FundingEventID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.TreatmentBMPID = treatmentBMP.TreatmentBMPID;
     this.TreatmentBMP   = treatmentBMP;
     treatmentBMP.FundingEvents.Add(this);
     this.FundingEventTypeID = fundingEventType.FundingEventTypeID;
     this.Year = year;
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static FundingEvent CreateNewBlank(TreatmentBMP treatmentBMP, FundingEventType fundingEventType)
 {
     return(new FundingEvent(treatmentBMP, fundingEventType, default(int)));
 }