31 lines
940 B
C#
31 lines
940 B
C#
namespace BS.Shared.DataContracts
|
|
{
|
|
public partial class OrganisationPersonRelationDC
|
|
{
|
|
public override bool Equals(object obj)
|
|
{
|
|
if(obj is OrganisationPersonRelationDC y)
|
|
{
|
|
if(Organisation2PersonOid is null && y.Organisation2PersonOid is null)
|
|
{
|
|
return GetHashCode() == y.GetHashCode();
|
|
}
|
|
|
|
if(Organisation2PersonOid != null && y.Organisation2PersonOid != null)
|
|
{
|
|
return Organisation2PersonOid == y.Organisation2PersonOid;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return Organisation2PersonOid.HasValue
|
|
? GetType().Name.GetHashCode() ^ Organisation2PersonOid.GetHashCode()
|
|
: base.GetHashCode();
|
|
}
|
|
}
|
|
}
|