/// <summary> /// Registers the OpenIddict entity sets in the Entity Framework Core /// context using the default OpenIddict models and the specified key type. /// </summary> /// <param name="builder">The builder used to configure the Entity Framework context.</param> /// <returns>The Entity Framework context builder.</returns> public static DbContextOptionsBuilder UseOpenIddict <TKey>([NotNull] this DbContextOptionsBuilder builder) where TKey : IEquatable <TKey> => builder.UseOpenIddict <OpenIddictApplication <TKey>, OpenIddictAuthorization <TKey>, OpenIddictScope <TKey>, OpenIddictToken <TKey>, TKey>();
/// <summary> /// Registers the OpenIddict entity sets in the Entity Framework Core /// context using the default OpenIddict models and the specified key type. /// </summary> /// <remarks> /// Note: when using a custom key type, the new key type MUST be registered by calling /// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TKey}"/>. /// </remarks> /// <param name="builder">The builder used to configure the Entity Framework context.</param> /// <returns>The Entity Framework context builder.</returns> public static DbContextOptionsBuilder UseOpenIddict <TKey>(this DbContextOptionsBuilder builder) where TKey : IEquatable <TKey> => builder.UseOpenIddict <OpenIddictEntityFrameworkCoreApplication <TKey>, OpenIddictEntityFrameworkCoreAuthorization <TKey>, OpenIddictEntityFrameworkCoreScope <TKey>, OpenIddictEntityFrameworkCoreToken <TKey>, TKey>();
/// <summary> /// Registers the OpenIddict entity sets in the Entity Framework Core context /// using the default OpenIddict models and the default key type (string). /// </summary> /// <param name="builder">The builder used to configure the Entity Framework context.</param> /// <returns>The Entity Framework context builder.</returns> public static DbContextOptionsBuilder UseOpenIddict([NotNull] this DbContextOptionsBuilder builder) => builder.UseOpenIddict <OpenIddictApplication, OpenIddictAuthorization, OpenIddictScope, OpenIddictToken, string>();
/// <summary> /// Registers the OpenIddict entity sets in the Entity Framework Core context /// using the default OpenIddict models and the default key type (string). /// </summary> /// <param name="builder">The builder used to configure the Entity Framework context.</param> /// <returns>The Entity Framework context builder.</returns> public static DbContextOptionsBuilder UseOpenIddict(this DbContextOptionsBuilder builder) => builder.UseOpenIddict <OpenIddictEntityFrameworkCoreApplication, OpenIddictEntityFrameworkCoreAuthorization, OpenIddictEntityFrameworkCoreScope, OpenIddictEntityFrameworkCoreToken, string>();