I previously followed the below tutorial on Dynamic Data scaffolding with Entity framework: https://www.youtube.com/watch?v=hWatePj2RmE (Part 1 and Part 2) (ASP.net Scaffolding, Dynamic Data with Entity framework)
I used this tutorial to implement a table editing solution, that does the following:
- Displays all tables in a given schema (EDT) and allows for a friendly web page to edit the contents.
- There are around 300 tables for editing.
- When creating or updating provides friendly pick lists to foreign key tables.
- All of the tables that we wish to edit are in a schema called "EDT"
The only current draw back is that i have to rebuild the entity model every few weeks (when the schema of the db changes)
I now have new requirements to do the following:
Audit the windows user account
- CRUD actions logged with change.
- Windows account recorded.
- Table name recorded.
FK tables in a read only way
- Create Foreign Keys to populate picklists.
- If the Foreign Key is in the dbo schema, this should be read only.
It would also be a huge advantage if i didn't have to rebuild the entity model all the time!
I have tried quite a few different things such as using custom fields, all of which seem to have a massive overhead once the model is refreshed. I also tried creating a MVC solution, however managing 300 controllers that change often is also not practical.
My specific questions are
- Is this the best way of creating an ASP site to manage CRUD on 300 tables that change often?
- What is the best method to meet the above new requirements?
- Is there a way to not have to rebuild the edmx file all the time?