C# Класс Ncqrs.Eventing.Storage.SQL.MsSqlServerEventStore

Stores events for a SQL database.
Наследование: IEventStore, ISnapshotStore
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetAllEvents ( System.Guid id ) : IEnumerable

Get all event for a specific event provider.

GetAllEventsSinceVersion ( System.Guid id, long version ) : IEnumerable

Get all events provided by an specified event source.

GetAllIdsForType ( Type eventProviderType ) : IEnumerable
GetSnapshot ( System.Guid eventSourceId ) : ISnapshot

Gets a snapshot of a particular event source, if one exists. Otherwise, returns null.

GetTableCreationQueries ( ) : IEnumerable

Gets the table creation queries that can be used to create the tables that are needed for a database that is used as an event store.

This returns the content of the TableCreationScript.sql that is embedded as resource.

MsSqlServerEventStore ( String connectionString ) : System
MsSqlServerEventStore ( String connectionString, IPropertyBagConverter converter = null ) : System
RemoveUnusedProviders ( ) : void
Save ( IEventSource eventSource ) : void

Saves all events from an event provider.

SaveShapshot ( ISnapshot snapshot ) : void

Saves a snapshot of the specified event source.

Приватные методы

Метод Описание
AddEventSource ( IEventSource eventSource, SqlTransaction transaction ) : void

Adds the event source to the event store.

GetVersion ( System.Guid providerId, SqlTransaction transaction ) : int?

Gets the version of the provider from the event store.

SaveEvent ( ISourcedEvent evnt, SqlTransaction transaction ) : void

Saves the event to the data store.

SaveEvents ( IEnumerable evnts, SqlTransaction transaction ) : void

Saves the events to the event store.

ToBinary ( object obj ) : byte[]
UpdateEventSourceVersion ( IEventSource eventSource, SqlTransaction transaction ) : void

Описание методов

GetAllEvents() публичный Метод

Get all event for a specific event provider.
public GetAllEvents ( System.Guid id ) : IEnumerable
id System.Guid The id of the event provider.
Результат IEnumerable

GetAllEventsSinceVersion() публичный Метод

Get all events provided by an specified event source.
public GetAllEventsSinceVersion ( System.Guid id, long version ) : IEnumerable
id System.Guid
version long
Результат IEnumerable

GetAllIdsForType() публичный Метод

public GetAllIdsForType ( Type eventProviderType ) : IEnumerable
eventProviderType System.Type
Результат IEnumerable

GetSnapshot() публичный Метод

Gets a snapshot of a particular event source, if one exists. Otherwise, returns null.
public GetSnapshot ( System.Guid eventSourceId ) : ISnapshot
eventSourceId System.Guid
Результат ISnapshot

GetTableCreationQueries() публичный статический Метод

Gets the table creation queries that can be used to create the tables that are needed for a database that is used as an event store.
This returns the content of the TableCreationScript.sql that is embedded as resource.
public static GetTableCreationQueries ( ) : IEnumerable
Результат IEnumerable

MsSqlServerEventStore() публичный Метод

public MsSqlServerEventStore ( String connectionString ) : System
connectionString String
Результат System

MsSqlServerEventStore() публичный Метод

public MsSqlServerEventStore ( String connectionString, IPropertyBagConverter converter = null ) : System
connectionString String
converter IPropertyBagConverter
Результат System

RemoveUnusedProviders() публичный Метод

public RemoveUnusedProviders ( ) : void
Результат void

Save() публичный Метод

Saves all events from an event provider.
public Save ( IEventSource eventSource ) : void
eventSource IEventSource
Результат void

SaveShapshot() публичный Метод

Saves a snapshot of the specified event source.
public SaveShapshot ( ISnapshot snapshot ) : void
snapshot ISnapshot
Результат void