我什至从未注意到这段代码:
' Configure the db context and user manager to use a single instance per request
app.CreatePerOwinContext(AddressOf ApptDbContext.Create)
所以我什至写了一个DbContext
过滤器,在请求的开始和结束时创建和处理一个实例。
现在看起来 OWIN 为我做了这个,我如何访问DbContext
它处理的?
应如何使用 IAppBuilder.CreatePerOwinContext问题的公认答案?对我不起作用,没有无参数Get()
,并且仅使用AssemblyQualifiedName
类型返回 null。