Skip to content
Olivier Lefebvre edited this page Dec 17, 2018 · 1 revision

You can implement your own store by implementing IDynamicProviderStore<TSchemeDefinition> interface.
To verify your implementation you can override DynamicManagerTestBase<TSchemeDefinition> of Aguacongas.AspNetCore.Authentication.TestBase.

public class DynamicManagerTest: DynamicManagerTestBase<SchemeDefinition>
{
    public DynamicManagerTest(ITestOutputHelper output): base(output)
    {
    }

    protected override DynamicAuthenticationBuilder AddStore(DynamicAuthenticationBuilder builder)
    {
        builder.Services.AddDbContext<SchemeDbContext>(options =>
        {
            options.UseInMemoryDatabase(Guid.NewGuid().ToString());
        });
        return builder.AddEntityFrameworkStore<SchemeDbContext>();
    }
}
Clone this wiki locally