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.
精彩评论