CQRS.NET  2.2
A lightweight enterprise framework to write CQRS, event-sourced and micro-service applications in hybrid multi-datacentre, on-premise and Azure environments.

◆ LoadAggregateToVersion< TAggregateRoot >()

virtual TAggregateRoot Cqrs.Domain.AggregateRepository< TAuthenticationToken >.LoadAggregateToVersion< TAggregateRoot > ( Guid  id,
int  version,
IList< IEvent< TAuthenticationToken >>  events = null 
)
protectedvirtual

Calls IAggregateFactory.Create to get a, TAggregateRoot and then calls LoadAggregateHistory<TAggregateRoot>.

Template Parameters
TAggregateRootThe Type of IAggregateRoot<TAuthenticationToken>.
Parameters
idThe id of the TAggregateRoot to create.
versionLoad events up-to and including from this version
eventsA collection of IEvent<TAuthenticationToken> to replay on the retrieved IAggregateRoot<TAuthenticationToken>. If null, the IEventStore<TAuthenticationToken> will be used to retrieve a list of IEvent<TAuthenticationToken> for you.
Type Constraints
TAggregateRoot :IAggregateRoot<TAuthenticationToken>