开发者

When do we write a new Controller in Asp.net MVC? [duplicate]

开发者 https://www.devze.com 2023-04-10 15:09 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: When should I create new Controller class in Asp.net MVC (Design Question)?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

When should I create new Controller class in Asp.net MVC (Design Question)?

I'm relatively new to ASP.net MVC and I was looking into the code of some app开发者_Python百科lication. I haven't given much of a thought for it earlier but when do we require a new controller? Are there any best practices regarding this?


This is probably a duplicate question - When should I create new Controller class in Asp.net MVC (Design Question)?...

...but, common practice is a new controller per resource, so for example, one for management of users, one for management of bookings etc. Then on each controller you'll have actions for add, modify, delete.

0

精彩评论

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