Reputation: 11
The extensions method AddEntityFrameworkCoreStores
is not working as expected. I get an error indicating that OpenIddictCoreBuilder
doesn't have the AddEntityFrameworkCoreStores
definition.
// Register the OpenIddict services.
services.AddOpenIddict(options =>
{
// Register the Entity Framework stores.
options.AddCore().AddEntityFrameworkCoreStores<ApplicationDbContext>();
I have these using
s in my project:
using System;
using System.Threading.Tasks;
using AspNet.Security.OpenIdConnect.Primitives;
using AuthorizationServer.Models;
using AuthorizationServer.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using OpenIddict.Abstractions;
using OpenIddict.Core;
using OpenIddict.EntityFrameworkCore.Models;
Upvotes: 0
Views: 1185
Reputation: 42110
The syntax has changed in RC3:
services.AddOpenIddict()
// Register the OpenIddict core services.
.AddCore(options =>
{
options.UseEntityFrameworkCore()
.UseDbContext<ApplicationDbContext>();
});
You can read the announcement here: https://github.com/openiddict/openiddict-core/issues/608.
Upvotes: 1