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