CQRS.NET  2.1
A lightweight enterprise framework to write CQRS, event-sourced and micro-service applications in hybrid multi-datacentre, on-premise and Azure environments.
Cqrs.Domain.AggregateRepository< TAuthenticationToken > Class Template Reference
+ Inheritance diagram for Cqrs.Domain.AggregateRepository< TAuthenticationToken >:

Public Member Functions

 AggregateRepository (IAggregateFactory aggregateFactory, IEventStore< TAuthenticationToken > eventStore, IEventPublisher< TAuthenticationToken > publisher, ICorrelationIdHelper correlationIdHelper)
 
virtual void Save< TAggregateRoot > (TAggregateRoot aggregate, int? expectedVersion=null)
 
virtual TAggregateRoot Get< TAggregateRoot > (Guid aggregateId, IList< IEvent< TAuthenticationToken >> events=null)
 
virtual void LoadAggregateHistory< TAggregateRoot > (TAggregateRoot aggregate, IList< IEvent< TAuthenticationToken >> events=null, bool throwExceptionOnNoEvents=true)
 

Protected Member Functions

virtual void PublishEvent (IEvent< TAuthenticationToken > @event)
 
virtual TAggregateRoot CreateAggregate< TAggregateRoot > (Guid id)
 
virtual TAggregateRoot LoadAggregate< TAggregateRoot > (Guid id, IList< IEvent< TAuthenticationToken >> events=null)
 

Properties

IEventStore< TAuthenticationToken > EventStore [get]
 
IEventPublisher< TAuthenticationToken > Publisher [get]
 
IAggregateFactory AggregateFactory [get]
 
ICorrelationIdHelper CorrelationIdHelper [get]