Controller necessary for creating database / Entity Framework
if I create a property set under models and list it in the context class and run a migration and database update the database is not created (as observed through MSSMS).
If I create a controller using entity framework in between creating a property set and the migration and database update, the database is created (as observed through MSSMS).
Am I correct in observing that a controller using entity framework has to be created in order for a database to be created through the migration and database update process?
(I thought perhaps a property set with the property set listed in the context would trigger the database being created).
Hi @Dean Everhart
Do you mean if use the "MVC Controller with Views, using Entity Framework" operation, you could create the database?
In the above scenario, whether you are using the same Data Context class? Whether they are using the same connection string? After migration, try to refresh the database in the SSMS, then check the tables.
I also check it on my side, both methods work well on my side (Using VS 2022, EF core 6).