Customising ASP.NET Dynamic Data with ADO.Net Entity Data Model for Ready Only and Audit

272 views Asked by At

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:

  1. Displays all tables in a given schema (EDT) and allows for a friendly web page to edit the contents.
  2. There are around 300 tables for editing.
  3. When creating or updating provides friendly pick lists to foreign key tables.
  4. 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:

  1. Audit the windows user account

    • CRUD actions logged with change.
    • Windows account recorded.
    • Table name recorded.
  2. 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

  1. Is this the best way of creating an ASP site to manage CRUD on 300 tables that change often?
  2. What is the best method to meet the above new requirements?
  3. Is there a way to not have to rebuild the edmx file all the time?
0

There are 0 answers