I’m developing a website with asp.net core 8 web API, SQL Server, utilizing the identity framework. The database contains various tables such as AspNetUsers, AspNetRoles, AspNetUserRoles, Brands, and more. Since I have already populated the database with real data, I prefer not to drop the table. When I need to make modifications to the database, I typically use command lines. However, each time I update the table, the AspNetUserRoles table gets cleared. How can I preserve the data in the userRoles table?
Here are the command lines I tried.
dotnet ef migrations add updateUserTable
dotnet ef database update
There is userRoles table after I execute these command lines but the userRoles table is empty.
I’m using VSCode for developing tool.