Class OpenIddictEntityFrameworkCoreBuilder
Exposes the necessary methods required to configure the OpenIddict Entity Framework Core services.
Inheritance
Inherited Members
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: cs.temp.dll.dll
Syntax
public class OpenIddictEntityFrameworkCoreBuilder
Constructors
OpenIddictEntityFrameworkCoreBuilder(IServiceCollection)
Initializes a new instance of OpenIddictEntityFrameworkCoreBuilder.
Declaration
public OpenIddictEntityFrameworkCoreBuilder(IServiceCollection services)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The services collection. |
Methods
Configure(Action<OpenIddictEntityFrameworkCoreOptions>)
Amends the default OpenIddict Entity Framework Core configuration.
Declaration
public OpenIddictEntityFrameworkCoreBuilder Configure(Action<OpenIddictEntityFrameworkCoreOptions> configuration)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<OpenIddictEntityFrameworkCoreOptions> | configuration | The delegate used to configure the OpenIddict options. |
Returns
| Type | Description |
|---|---|
| OpenIddictEntityFrameworkCoreBuilder |
Remarks
This extension can be safely called multiple times.
ReplaceDefaultEntities<TKey>()
Configures OpenIddict to use the default OpenIddict Entity Framework Core entities, with the specified key type.
Declaration
public OpenIddictEntityFrameworkCoreBuilder ReplaceDefaultEntities<TKey>()
where TKey : IEquatable<TKey>
Returns
| Type | Description |
|---|---|
| OpenIddictEntityFrameworkCoreBuilder |
Type Parameters
| Name | Description |
|---|---|
| TKey |
ReplaceDefaultEntities<TApplication, TAuthorization, TScope, TToken, TKey>()
Configures OpenIddict to use the specified entities, derived from the default OpenIddict Entity Framework Core entities.
Declaration
public OpenIddictEntityFrameworkCoreBuilder ReplaceDefaultEntities<TApplication, TAuthorization, TScope, TToken, TKey>()
where TApplication : OpenIddictEntityFrameworkCoreApplication<TKey, TAuthorization, TToken> where TAuthorization : OpenIddictEntityFrameworkCoreAuthorization<TKey, TApplication, TToken> where TScope : OpenIddictEntityFrameworkCoreScope<TKey> where TToken : OpenIddictEntityFrameworkCoreToken<TKey, TApplication, TAuthorization> where TKey : IEquatable<TKey>
Returns
| Type | Description |
|---|---|
| OpenIddictEntityFrameworkCoreBuilder |
Type Parameters
| Name | Description |
|---|---|
| TApplication | |
| TAuthorization | |
| TScope | |
| TToken | |
| TKey |
UseDbContext(Type)
Configures the OpenIddict Entity Framework Core stores to use the specified database context type.
Declaration
public OpenIddictEntityFrameworkCoreBuilder UseDbContext(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | type | The type of the |
Returns
| Type | Description |
|---|---|
| OpenIddictEntityFrameworkCoreBuilder |
UseDbContext<TContext>()
Configures the OpenIddict Entity Framework Core stores to use the specified database context type.
Declaration
public OpenIddictEntityFrameworkCoreBuilder UseDbContext<TContext>()
where TContext : DbContext
Returns
| Type | Description |
|---|---|
| OpenIddictEntityFrameworkCoreBuilder |
Type Parameters
| Name | Description |
|---|---|
| TContext | The type of the |