开发者

Is it OK to have auxiliary methods inside the controller?

Sometimes I need to have small auxiliary methods specific for some controller, is it OK to actually have them inside the controller class? My concern is that these methods are not supposed to be routed/reachable th开发者_开发问答rough URL.


Yes, it is OK. You may either make these methods private, or mark them as [NonAction] attribute: in both cases they won't be routed to.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜