Files
BeWoPlaner/Shared/DataContracts/ClientPartials/CustomerPersonRelationDC.cs
2016-06-27 01:45:38 +02:00

29 lines
955 B
C#

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