/// <summary> /// Enum types are equal by primary key /// </summary> public bool Equals(DelineationType other) { if (other == null) { return(false); } return(other.DelineationTypeID == DelineationTypeID); }
/// <summary> /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible /// </summary> public Delineation(DbGeometry delineationGeometry, DelineationType delineationType, bool isVerified, TreatmentBMP treatmentBMP, DateTime dateLastModified, bool hasDiscrepancies) : this() { // Mark this as a new object by setting primary key with special value this.DelineationID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue(); this.DelineationGeometry = delineationGeometry; this.DelineationTypeID = delineationType.DelineationTypeID; this.IsVerified = isVerified; this.TreatmentBMPID = treatmentBMP.TreatmentBMPID; this.TreatmentBMP = treatmentBMP; this.DateLastModified = dateLastModified; this.HasDiscrepancies = hasDiscrepancies; }
/// <summary> /// Creates a "blank" object of this type and populates primitives with defaults /// </summary> public static Delineation CreateNewBlank(DelineationType delineationType, TreatmentBMP treatmentBMP) { return(new Delineation(default(DbGeometry), delineationType, default(bool), treatmentBMP, default(DateTime), default(bool))); }