Inheritance Cast
Please help me c#, level intermediate
Problem Code:
How can I convert from
AppDbContext
to IdentityDbContext<IdentityUser>
??4 Replies
you don't. You can't case from parent to derived. Call the derived ctor.
the generic argument is not replacable in
FindFirstUser
. use FindFirstUser(IdentityDbContext<AppUser> dbContext)
instead, and it'll workI can't change it to AppUser because it's from different library where there is no AppUser class. Thanks I found solution by myself.
that also works, yeah