0

I'd like to bundle a controller along with everything it needs to function into a DLL. It should --

  1. Provide a controller
  2. Automatically register a route for that controller
  3. Provide a view for that controller to use

I want this to be as "hands-free" as possible -- if the DLL is present, the new route is available which is mapped to the controller and returns the view. If the DLL is gone, none of this happens.

I can't be the first person to need this, so I'm curious if there are accepted/common patterns for doing it.

Deane
  • 8,269
  • 12
  • 58
  • 108
  • One version of feature you are looking for called "portable area". I.e. check http://stackoverflow.com/questions/5698219/asp-net-mvc-3-razor-views-and-portable-areas and http://elegantcode.com/2012/04/06/mvc-portable-areas/ . – Alexei Levenkov Jan 10 '14 at 23:53
  • You could look at the code for nopCommerce - they have a pattern whereby plugins are shipped as a dll, which include registrations for the IoC container, routes, views, etc. – Paul Deen Jan 11 '14 at 02:53

0 Answers0