开发者

ASP.NET MVC 3 RemoteAttribute and Separation of concerns

Isn't it a violation of separation of concerns princi开发者_StackOverflow中文版ple when you use the RemoteAttribute on your model's property to indicate what action and controller to call? It makes you tie your model to a specific controller via string arguments.


Yes it does, but so does using all the other DataAnnotations attributes.

Fortunately the model metadata system in MVC is pluggable so you could write your own metadata provider that's not tied to attributes on a model class.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜