Skip to content

Commit 1b51865

Browse files
Minor refactoring at Seedwork
1 parent 5af3bb6 commit 1b51865

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

  • src/Services/Ordering/Ordering.Domain/SeedWork

src/Services/Ordering/Ordering.Domain/SeedWork/Entity.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@
66

77
public abstract class Entity
88
{
9-
109
int? _requestedHashCode;
11-
int _Id;
12-
13-
private List<INotification> _domainEvents;
14-
10+
int _Id;
1511
public virtual int Id
1612
{
1713
get
@@ -24,13 +20,13 @@ protected set
2420
}
2521
}
2622

23+
private List<INotification> _domainEvents;
2724
public List<INotification> DomainEvents => _domainEvents;
2825
public void AddDomainEvent(INotification eventItem)
2926
{
3027
_domainEvents = _domainEvents ?? new List<INotification>();
3128
_domainEvents.Add(eventItem);
3229
}
33-
3430
public void RemoveDomainEvent(INotification eventItem)
3531
{
3632
if (_domainEvents is null) return;
@@ -74,7 +70,6 @@ public override int GetHashCode()
7470
return base.GetHashCode();
7571

7672
}
77-
7873
public static bool operator ==(Entity left, Entity right)
7974
{
8075
if (Object.Equals(left, null))

0 commit comments

Comments
 (0)