You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below extension method is not working as expected.
publicstaticMartenStoreExpression<T> AddMartenStore<T>(thisIServiceCollectionservices,Func<IServiceProvider,StoreOptions>configure)where T :class, IDocumentStore
I am not able to get registered store using AllDocumentStores
However, AllDocumentStores works fine if I register marten store using another extension method, it's the one that uses Action<StoreOptions> configure instead of Func<IServiceProvider, StoreOptions> configure.
Seems like services.AddSingleton<IDocumentStoreSource, DocumentStoreSource<T>>(); call is missing in AddMartenStore<T>(this IServiceCollection services, Func<IServiceProvider, StoreOptions> configure).
I would suggest to move services.AddSingleton<IDocumentStoreSource, DocumentStoreSource<T>>(); registration from MartenStoreExpression<T> AddMartenStore<T>(this IServiceCollection services, Action<StoreOptions> configure) to AddMartenStore<T>(this IServiceCollection services, Func<IServiceProvider, StoreOptions> configure) or make the latter extension internal if it's not supposed to be used.
The text was updated successfully, but these errors were encountered:
Below extension method is not working as expected.
I am not able to get registered store using
AllDocumentStores
However,
AllDocumentStores
works fine if I register marten store using another extension method, it's the one that usesAction<StoreOptions> configure
instead ofFunc<IServiceProvider, StoreOptions> configure
.Seems like
services.AddSingleton<IDocumentStoreSource, DocumentStoreSource<T>>();
call is missing inAddMartenStore<T>(this IServiceCollection services, Func<IServiceProvider, StoreOptions> configure)
.I would suggest to move
services.AddSingleton<IDocumentStoreSource, DocumentStoreSource<T>>();
registration fromMartenStoreExpression<T> AddMartenStore<T>(this IServiceCollection services, Action<StoreOptions> configure)
toAddMartenStore<T>(this IServiceCollection services, Func<IServiceProvider, StoreOptions> configure)
or make the latter extension internal if it's not supposed to be used.The text was updated successfully, but these errors were encountered: