MVC design for archived data view

Posted by Hemant Tank on Stack Overflow See other posts from Stack Overflow or by Hemant Tank
Published on 2012-03-16T10:23:45Z Indexed on 2012/08/30 15:38 UTC
Read the original article Hit count: 209

Filed under:
|
|

Implementation of a standard archive process in ASP.Net MVC. Backend SQL Server 2005

We've an existing web app built in MVC. We've an Entity "Claim" and it has some child entities like ClaimDetails, Files, etc... A pretty standard setup in DB. Each entity has its own table and are linked via FK. Now, we need to have an "Archive" feature in web app which will allow admin to archive a Claim and its child entities. An archived Claim shud become readonly when visited again.

Here're some points on which I need your valued opinion -

  1. To keep it simple and scalable (for a few million records) for now we plan to simply add a bit field "Archived" to the Claim table in db. And change the behavior accordingly in the web app.

  2. We've a 'Manage claim' page which renders a bunch of diff views for Claim and its child entities. Now, for a readonly view we can either use the same views or have a separate set of views. What do you suggest?

  3. At controller level, we can identify archived claim and select which view to render.

  4. At model level, though it'd be great to be able to use the same model used for Manage Claim - but it might not get us the "text" of some lookup fields. For example, Claim.BrandId is rendered as a dropdown in Manage claim (requires only BrandId) but for readonly view we need 'BrandText'.

  5. Any existing ref or architecture level example would be great.

Here's my prev SO post but its more about db level changes: Design a process to archive data (SQL Server 2005)

Thank you.

© Stack Overflow or respective owner

Related posts about mvc

Related posts about asp.net-mvc-2