Created
April 24, 2014 02:53
-
-
Save kmoormann/11239862 to your computer and use it in GitHub Desktop.
Equals method override snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override bool Equals(object obj) | |
{ | |
return this.Equals(obj as IAggregate); | |
} | |
public virtual bool Equals(IAggregate other) | |
{ | |
return null != other && other.Id == this.Id; | |
} | |
//from: https://github.com/joliver/CommonDomain/blob/master/src/proj/CommonDomain.Core/AggregateBase.cs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment