Updating access database using asp
In this case the answer is to change the code that is generated during the creation of the classes and is done using some t4 templates, referred to as scaffolding.
By default the reverse engineering of the database uses some internal scaffolding, but you can import the scaffolding and change it.
The problem is that you would then have to re-import the database and so lose all your edits, which you or your colleague might have forgotten about by then, and suddenly your whole web application slows down.
If you have Entity Framework Power Tools installed then you need to disable it and restart Visual Studio before you can import/reverse engineer a database.
In many large-scale projects, software developers are often have to work with existing SQL Server databases with predefined tables and relationships.
The problem can be that some predefined databases can have aspects that are awkward to deal with from the software side.
However if this isn’t an issue for you then you can leave it in.
Lazy Loading can make handling relationships easier for the software, although in my second article I will show you a method that specifically selects each data column it needs and therefore does not need Lazy Loading Now you could hand-edit each generated class so as to remove the ‘virtual’, but what happens if, or rather when, the database changes?