feat: added IIdentifiable comparison interface & IsIdentical extension method
This commit is contained in:
@@ -101,4 +101,6 @@ public abstract class BaseEntity : IEntity
|
||||
|
||||
protected BaseEntity() => Id = Guid.NewGuid().ToString("D");
|
||||
protected BaseEntity(string id) => Id = id;
|
||||
|
||||
public int CompareTo(IIdentifiable? other) => Id.CompareTo(other?.Id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user