开发者

ASP.NET MVC 2 RC areas and shared models

开发者 https://www.devze.com 2022-12-18 15:28 出处:网络
Once new area is created by the means of Visual Studio context menu, there are three folders: Controllers, Models, Views. Is it supposed that every area should have it\'s own model classes?Or is it ac

Once new area is created by the means of Visual Studio context menu, there are three folders: Controllers, Models, Views. Is it supposed that every area should have it's own model classes? Or is it acceptable/widely-used/good for all areas to share the same model classes in the root Models folder?

My project differs Domain Model and View Model, so Mode开发者_Python百科ls folder contain View Models.

And yes, several views of several areas seems to share the same View-Models some way.


If your View Models are shared by several Areas, put them into ~/Models - there is no any restiriction on that

0

精彩评论

暂无评论...
验证码 换一张
取 消