Class ReplicatedSqlEventStore<TAuthenticationToken>
A simplified SqlServer based EventStore<TAuthenticationToken> that uses LinqToSql and follows a rigid schema that also replicates to multiple connections, but only reads from one connection.
Inheritance
System.Object
EventStore<TAuthenticationToken>
SqlEventStore<TAuthenticationToken>
ReplicatedSqlEventStore<TAuthenticationToken>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Cqrs.Events
Assembly: Cqrs.dll
Syntax
public class ReplicatedSqlEventStore<TAuthenticationToken> : SqlEventStore<TAuthenticationToken>, IEventStore<TAuthenticationToken>
Type Parameters
Name | Description |
---|---|
TAuthenticationToken | The System.Type of the authentication token. |
Constructors
ReplicatedSqlEventStore(IEventBuilder<TAuthenticationToken>, IEventDeserialiser<TAuthenticationToken>, ILogger, IConfigurationManager)
Instantiates and Initialises a new instance of the ReplicatedSqlEventStore<TAuthenticationToken> class.
Declaration
public ReplicatedSqlEventStore(IEventBuilder<TAuthenticationToken> eventBuilder, IEventDeserialiser<TAuthenticationToken> eventDeserialiser, ILogger logger, IConfigurationManager configurationManager)
Parameters
Type | Name | Description |
---|---|---|
IEventBuilder<TAuthenticationToken> | eventBuilder | |
IEventDeserialiser<TAuthenticationToken> | eventDeserialiser | |
cdmdotnet.Logging.ILogger | logger | |
IConfigurationManager | configurationManager |
Properties
WritableConnectionStrings
A collection of connection strings that are used to write to the database.
Declaration
protected IEnumerable<string> WritableConnectionStrings { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
Methods
PersistEvent(EventData)
Persist the provided eventData
into each SQL Server in WritableConnectionStrings.
A single System.Transactions.TransactionScope wraps all SQL servers, so all must complete successfully, or they will ALL roll back.
Declaration
protected override void PersistEvent(EventData eventData)
Parameters
Type | Name | Description |
---|---|---|
EventData | eventData | The EventData to persist. |
Overrides
Cqrs.Events.SqlEventStore<TAuthenticationToken>.PersistEvent(Cqrs.Events.EventData)