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

34 lines
1.0 KiB
C#

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