diff --git a/EntityDb.Common/Extensions/IServiceCollectionExtensions.cs b/EntityDb.Common/Extensions/IServiceCollectionExtensions.cs index 77ba843d..eddf4edb 100644 --- a/EntityDb.Common/Extensions/IServiceCollectionExtensions.cs +++ b/EntityDb.Common/Extensions/IServiceCollectionExtensions.cs @@ -72,6 +72,18 @@ public static void AddAgentAccessor(this IServiceCollection serv serviceCollection.AddScoped(); } + /// + /// Adds a custom implementation of to a service collection. + /// + /// The type of the entity to be snapshotted. + /// The type that implements . + /// The service collection + public static void AddSnapshottingStrategy(this IServiceCollection serviceCollection) + where TSnapshottingStrategy : class, ISnapshottingStrategy + { + serviceCollection.AddSingleton, TSnapshottingStrategy>(); + } + /// /// Adds a custom implementation of to a service collection. ///