谁能指出我使用 IChangeSetItemAuthorizer 在 RESTier 1.0 中进行自定义授权的示例项目。
问问题
129 次
1 回答
2
事实发生几个月后,但我昨天才遇到这个问题。您需要将访问修饰符从 更改protected
为public
。
所以在他们的例子中,它会改变:
protected static new IServiceCollection ConfigureApi(Type apiType, IServiceCollection services)
{
return EntityFrameworkApi<TrippinModel>.ConfigureApi(apiType, services)
.AddService<IChangeSetItemAuthorizer, CustomizedAuthorizer>();
}
对此:
public static new IServiceCollection ConfigureApi(Type apiType, IServiceCollection services)
{
return EntityFrameworkApi<TrippinModel>.ConfigureApi(apiType, services)
.AddService<IChangeSetItemAuthorizer, CustomizedAuthorizer>();
}
于 2017-07-26T13:19:23.770 回答