Ask Your Question
1

What is the error that occurs when updating the database using Entity Framework and ApplicationUser that derives from the IdentityUser class?

asked 2022-07-01 11:00:00 +0000

ladyg gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-07-31 08:00:00 +0000

nofretete gravatar image

The error that may occur when updating the database using Entity Framework and ApplicationUser that derives from the IdentityUser class is "The entity type ApplicationUser is not part of the model for the current context." This error occurs when Entity Framework cannot recognize the ApplicationUser class as an entity in the database context. To resolve this error, you may need to add the ApplicationUser class to the database context using DbSet<> or add it as a separate entity configuration in the DbContext.OnModelCreating() method.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-07-01 11:00:00 +0000

Seen: 8 times

Last updated: Jul 31 '22