I\'m building an MVC 3 application where MEF is used. The main idea is to have plug-in mechanism where models, controllers and views are loaded dynamically during runtime from m
Here is a thought.
If you follow the View Model Pattern then instead of sending the DTO's straight to the view use a ViewModel that is would be located in the same assembly as the View.
So Instead of:
UserDTO model is located in Module1.Data.dll ShowUserController.cs is located in Module1.Web.dll/Controllers/ Index.cshtml is located in Module1.Web.dll/Views/ShowUser (with declared @model Module1.Data.UserDto)
You would have:
UserDTO model is located in Module1.Data.dll ShowUserController.cs is located in Module1.Web.dll/Controllers/ UserVM located in Module1.Web.dll/ViewModels Index.cshtml is located in Module1.Web.dll/Views/ShowUser (with declared @model Module1.Web.ViewModels.UserVM)
Have the Controller Map your DTO's to ViewModels
See AutoMapper to help with the Mapping