In my database, there are maybe a dozen tables that represent lookup types (All have ID and Name columns – No, they must remain as seperate tables, won’t be normalized into one table). I’m building an administration application, where I want an administrator to be able to add/edit/delete/list all of these lookups. I know I can re-use the model, but is there a more efficient way for me to write this in an asp mvc 2 application, other than writing 3 views, 1 controller for each lookup type resulting in 48 views and 12 controllers?
Share
I wouldn’t recommend removing the coupling between your models, the controllers, and views. The idea behind this pattern is that you get to separate the business logic from the presentation from the workflow. If you start mixing multiple models into the same views/controllers, it gets messy.
Maybe try doing what you’re attempting using a master page and having your models inherit from a common base class or something like that instead? This way you can reuse code without smashing it into the same files.