更新时间:2023-02-24 22:58:50
我发现您可以通过 IdentityStore
实例使用 DbContext
并使用井-已知方法 .Set
.
I've found that you can use the DbContext
via the IdentityStore
instance and use the well-known method .Set<T>()
.
这对我有用:
var identityStore = new IdentityStore();
foreach (var role in identityStore.DbContext.Set<Role>())
{
Debug.WriteLine(role.Name);
}