-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
If I create a IdentityDbContext and try to read the DBSet for the UserPasskeys I get this error
System.InvalidOperationException : Cannot create a DbSet for 'IdentityUserPasskey<int>' because this type is not included in the model for the context.
Stack Trace:
InternalDbSet`1.get_EntityType()
InternalDbSet`1.CheckState()
InternalDbSet`1.get_EntityQueryable()
IEnumerable<TEntity>.GetEnumerator()
List`1.ctor(IEnumerable`1 collection)
Enumerable.ToList[TSource](IEnumerable`1 source)
UnitTest1.Test1() line 17
MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
All the other entities can be read
Expected Behavior
I would expect to read the query
Steps To Reproduce
I created a test project in the https://github.com/luizfbicalho/error-passkey-aspnet-identity
tried with 3 different scenarios , one test for each, and one test that works for the others dbSets
Exceptions (if any)
System.InvalidOperationException : Cannot create a DbSet for 'IdentityUserPasskey' because this type is not included in the model for the context.
Stack Trace:
InternalDbSet1.get_EntityType() InternalDbSet1.CheckState()
InternalDbSet1.get_EntityQueryable() IEnumerable<TEntity>.GetEnumerator() List1.ctor(IEnumerable1 collection) Enumerable.ToList[TSource](IEnumerable1 source)
UnitTest1.Test1() line 17
MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
.NET Version
.NET 10
Anything else?
No response