Reuse an MVC area in multiple MVC applications?
Asked Answered
G

2

6

I have some common web pages that will be in multiple MVC applications. For those pages I'd like to reuse the same source code (controllers + views) between the different MVC web sites. What is the best way to go about doing this?

ASP.NET MVC areas seem like one possibility but they just a sub directory of the website project. Is it possible to reuse an MVC area in multiple MVC applications?

Guffaw answered 15/5, 2010 at 13:37 Comment(0)
S
4

You could embed views into assemblies and implement a custom VirtualPathProvider.

Succedaneum answered 15/5, 2010 at 13:54 Comment(1)
Check out github.com/mcintyre321/… for one such Nugettable providerBroomrape

© 2022 - 2024 — McMap. All rights reserved.