namespace BS.Shared.DataContracts { public partial class CostRatePeriodDC { public override bool Equals(object obj) { if (obj is CostRatePeriodDC) { var y = (CostRatePeriodDC)obj; if (this.CostRatePeriodOid == null && y.CostRatePeriodOid == null) { return this.GetHashCode() == y.GetHashCode(); } if (this.CostRatePeriodOid != null && y.CostRatePeriodOid != null) { return this.CostRatePeriodOid == y.CostRatePeriodOid; } } return false; } public override int GetHashCode() { return this.CostRatePeriodOid.HasValue ? this.GetType().Name.GetHashCode() ^ this.CostRatePeriodOid.GetHashCode() : base.GetHashCode(); } } }