有没有人能向我推荐一个在RESTier 1.0中使用IChangeSetItemAuthorizer进行自定义授权的示例项目。
发布于 2017-07-26 21:19:24
几个月后,但我昨天才发现这个问题。您需要将访问修饰符从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>();
}https://stackoverflow.com/questions/42731471
复制相似问题