public override bool Equals(object @object)
{
bool result = false;
if (@object != null && @object == this)
{
result = true;
}
else if (@object != null && @object.GetType() == this.GetType() && (((IdentifiableModel)@object).id == this.id || ((IdentifiableModel)@object).id != null && this.id != null && ((IdentifiableModel)@object).id.Equals(this.id)))
// If they are both null
// If they are not null but are equal objects.
{
result = true;
}
return result;
}