Created
November 13, 2014 22:08
-
-
Save codescribler/448a58a2e5fc9bc7ed34 to your computer and use it in GitHub Desktop.
A simplified aggregate root
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 abstract class AggregateRoot | |
{ | |
private readonly List<Event> _changes = new List<Event>(); | |
public abstract Guid Id { get; } | |
public int Version { get; internal set; } | |
public IEnumerable<Event> GetUncommittedChanges() | |
{ | |
// Removed for clarity | |
} | |
public void MarkChangesAsCommitted() | |
{ | |
// Removed for clarity | |
} | |
public void LoadsFromHistory(IEnumerable<Event> history) | |
{ | |
// Removed for clarity | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment