Пример #1
0
 public IEnumerable <StoredEvent> All(Guid aggregateId)
 {
     return(context.Set <StoredEvent>().Where(e => e.AggregateId == aggregateId));
 }
Пример #2
0
 public IEnumerable <StoredEvent> GetEvents(Guid aggregateId, int afterVersion = 0)
 {
     return(context.Set <StoredEvent>().Where(e => e.AggregateId == aggregateId && e.Version >= afterVersion));
 }
 public IEnumerable <StoredEvent> GetEvents <TKey>(TKey eventId, int afterVersion = 0)
     where TKey : IEquatable <TKey>
 {
     return(context.Set <StoredEvent>().Where(e => e.EventId == eventId.ToString() && e.Version >= afterVersion));
 }