[Serializable] public abstract class Entity { public Entity() { } public Entity(int id) { this.Id = id; } public virtual int Id { get; set; } public override bool Equals(object obj) { Entity other = (Entity)obj; return this.Id == other.Id; } public override int GetHashCode() { return this.Id.GetHashCode(); } }
No comments:
Post a Comment