Home > Net >  About the Scaffold - DbContext generated from a database class of problems
About the Scaffold - DbContext generated from a database class of problems

Time:12-19

Projects for the first time use, Scaffold - DbContext "database connection" is Microsoft. EntityFrameworkCore. Essentially - OutputDir Models

This can put the tables in the database, to automatically generate the corresponding class out

But when I modify the fields in a database table or added after table, reoccupy Scaffold - DbContext, have been reported, the Build failed.

I use the
Scaffold - DbContext "database connection" is Microsoft. EntityFrameworkCore. Essentially - OutputDir Models - force

Also failed,


CodePudding user response:

Maybe your connection string is not successfully connected to the database

CodePudding user response:

Will, of course, an error, the model field does not agree with the definition of data table,

CodePudding user response:


The inside of the database fields or table has updated

Second, so I have to update the generated classes

, that is, if it cannot be updated second generated class is not the first time after class is loaded, there was no way to in the updated

After the database table, I'd like to have a a manual in program writing class?
  • Related