Andre Silveira

Andre Silveira

  • 1.6k
  • 155
  • 15.8k

Database first and Identity problem

Jul 12 2021 7:28 PM

Hi all,

I'm making a project using database first and Identity (Microsoft.AspNetCore.Identity).

I extended the IdentityUser by creating a class with some properties that I will need. 

I scafolded the tables on the database and I'm trying to use a single DbContext for the entire project.

After a lot of errors, I created a table on the database that has all columns from AspNetUsers plus the columns that I need to my user model. It seems that the Identity framework is using that new table instead of the AspNetUsers table, as it was supposed to do.

How do I change that? Is there any tutorial on how to use database first AND Identity?

Thanks for your help in advance.


Answers (2)