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

29 lines
977 B
C#

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