Class MappingServiceCollectionExtensions
- Namespace
- Microsoft.Extensions.DependencyInjection
- Assembly
- Stratara.Shared.dll
Dependency-injection helpers that register Stratara's mapping primitives (event-stream entry to IEvent conversion) into an IServiceCollection.
public static class MappingServiceCollectionExtensions
- Inheritance
-
MappingServiceCollectionExtensions
- Inherited Members
Methods
AddMapping(IServiceCollection)
Registers the singleton IEventMapperFactory implementation used by the
event-sourcing stack to materialize typed IEvent instances from persisted
EventStreamEntry / EventMessage rows.
public static IServiceCollection AddMapping(this IServiceCollection services)
Parameters
servicesIServiceCollectionThe DI container to extend.
Returns
- IServiceCollection
The same
servicesinstance to allow fluent chaining.
Examples
services.AddMapping();