avatar
A question about MVC# DotNet - 窗口里的风景
n*0
1
I am a beginner with MVC. Can anybody tell me how to put controller and
model into separate projects (assemblies)? Thanks.
avatar
s*o
2
It as easy as to put them in a class library project and refer to them
in your web application.
...
Well this is just the case for your Model. For controllers, there are
more works to do because you need to tell the framework where to find
the controllers. Check for following links for more details:
http://stackoverflow.com/questions/401376/asp-net-mvc-put-contr
into-a-separate-project
http://forums.asp.net/t/1610265.aspx/1?
How+to+Move+Controllers+Models+into+a+New+Project+Assembly+in+MVC+2+
http://dotnetslackers.com/articles/aspnet/Storing-ASP-NET-MVC-
Controllers-Views-in-separate-assemblies.aspx#s8-why-bin-why

and

【在 n******0 的大作中提到】
: I am a beginner with MVC. Can anybody tell me how to put controller and
: model into separate projects (assemblies)? Thanks.

avatar
n*0
3
Thank you very much!

【在 s***o 的大作中提到】
: It as easy as to put them in a class library project and refer to them
: in your web application.
: ...
: Well this is just the case for your Model. For controllers, there are
: more works to do because you need to tell the framework where to find
: the controllers. Check for following links for more details:
: http://stackoverflow.com/questions/401376/asp-net-mvc-put-contr
: into-a-separate-project
: http://forums.asp.net/t/1610265.aspx/1?
: How+to+Move+Controllers+Models+into+a+New+Project+Assembly+in+MVC+2+

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。