扩展方法AddEntityFrameworkCoreStores
未按预期工作。我收到错误消息,表明OpenIddictCoreBuilder
没有AddEntityFrameworkCoreStores
定义。
// Register the OpenIddict services.
services.AddOpenIddict(options =>
{
// Register the Entity Framework stores.
options.AddCore().AddEntityFrameworkCoreStores<ApplicationDbContext>();
我的项目中有using
个:
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;
答案 0 :(得分:0)
RC3中的语法已更改:
services.AddOpenIddict()
// Register the OpenIddict core services.
.AddCore(options =>
{
options.UseEntityFrameworkCore()
.UseDbContext<ApplicationDbContext>();
});
您可以在此处阅读公告:https://github.com/openiddict/openiddict-core/issues/608。