diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Entity.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Entity.cs
index c96e305d45..07e1648ab4 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Entity.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Entity.cs
@@ -35,8 +35,7 @@ namespace Volo.Abp.Domain.Entities
Id = id;
}
- ///
- public override bool Equals(object obj)
+ public bool EntityEquals(object obj)
{
if (obj == null || !(obj is Entity))
{
@@ -73,33 +72,7 @@ namespace Volo.Abp.Domain.Entities
return Id.Equals(other.Id);
}
-
- ///
- public override int GetHashCode()
- {
- if (Id == null)
- {
- return 0;
- }
-
- return Id.GetHashCode();
- }
-
- public static bool operator ==(Entity left, Entity right)
- {
- if (Equals(left, null))
- {
- return Equals(right, null);
- }
-
- return left.Equals(right);
- }
-
- public static bool operator !=(Entity left, Entity right)
- {
- return !(left == right);
- }
-
+
public override object[] GetKeys()
{
return new object[] {Id};
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs
index ea84b41792..00a4c7ddd3 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs
@@ -7,23 +7,9 @@ namespace Volo.Abp.Domain.Values
public abstract class ValueObject
{
- protected static bool EqualOperator(ValueObject left, ValueObject right)
- {
- if (ReferenceEquals(left, null) ^ ReferenceEquals(right, null))
- {
- return false;
- }
- return ReferenceEquals(left, null) || left.Equals(right);
- }
-
- protected static bool NotEqualOperator(ValueObject left, ValueObject right)
- {
- return !(EqualOperator(left, right));
- }
-
protected abstract IEnumerable