/// <summary> /// Enum types are equal by primary key /// </summary> public bool Equals(ObservationTypeSpecification other) { if (other == null) { return(false); } return(other.ObservationTypeSpecificationID == ObservationTypeSpecificationID); }
/// <summary> /// Creates a "blank" object of this type and populates primitives with defaults /// </summary> public static TreatmentBMPAssessmentObservationType CreateNewBlank(ObservationTypeSpecification observationTypeSpecification) { return(new TreatmentBMPAssessmentObservationType(default(string), observationTypeSpecification, default(string))); }
/// <summary> /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible /// </summary> public TreatmentBMPAssessmentObservationType(string treatmentBMPAssessmentObservationTypeName, ObservationTypeSpecification observationTypeSpecification, string treatmentBMPAssessmentObservationTypeSchema) : this() { // Mark this as a new object by setting primary key with special value this.TreatmentBMPAssessmentObservationTypeID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue(); this.TreatmentBMPAssessmentObservationTypeName = treatmentBMPAssessmentObservationTypeName; this.ObservationTypeSpecificationID = observationTypeSpecification.ObservationTypeSpecificationID; this.TreatmentBMPAssessmentObservationTypeSchema = treatmentBMPAssessmentObservationTypeSchema; }