简体   繁体   English

ASP.NET MVC分为多个项目

[英]ASP.NET MVC split into multiple projects

is it possible to have ASP.NET MVC areas in multiple projects? 是否可以在多个项目中拥有ASP.NET MVC区域? For example: 例如:

Admin area - MyProject.Admin project
Forum area - MyProject.Forum project
etc...

From what I header it's not possible out of the box, but is possible with Portable areas from MVCContrib. 从我的标头来看,这是不可能的,但是MVCContrib的可移植区域是可能的。 Is it possible to do that with FubuMVC? FubuMVC可以做到吗?

Is it possible to do that with FubuMVC? FubuMVC可以做到吗?

FubuMVC allows you to package up controllers, views, assets, etc. by using Bottles (similar in concept to Areas, but better). FubuMVC允许您通过使用Bottles(概念与Areas类似,但是更好)打包控制器,视图,资产等。

From what I header it's not possible out of the box 根据我的标题,不可能开箱即用

You have heard correctly. 您没听错。 The problem is with embedding the views into a separate assembly. 问题在于将视图嵌入到单独的程序集中。 While not possible out-of-the-box you could definitely achieve it as shown in this article . 虽然不可能立即可用,但您绝对可以如本文中所示实现它。

but is possible with Portable areas from MVCContrib 但是可以通过MVCContrib使用便携式区域

Yes. 是。

Is it possible to do that with FubuMVC? FubuMVC可以做到吗?

I have no idea. 我不知道。

Here is an example of a portable area setup that I wrote. 这是我编写的可移植区域设置的示例。 You can package them very easily with MVC using the contrib. 您可以使用contrib通过MVC轻松打包它们。 It isn't hard to do it. 做到这一点并不难。

http://elegantcode.com/2012/04/06/mvc-portable-areas/ http://elegantcode.com/2012/04/06/mvc-portable-areas/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM