I'm currently doing a custom attribute, and did so开发者_如何学Gome custom classes for one of my ASP.NET MVC project.
I was wondering, is there a dedicated location to put them? I mean, some correct path naming or something.
Like controllers goes in Controllers\, models in Models\, etc...
Any suggestion is welcome!
Thanks!
If those attributes represent custom action filters I would put them into the Filters
sibfolder. If they represent validator data annotations, into the Validators
folder, ... So based on their function I would find a name.
The way I usually do is add a separate library project and put them there, under descriptive folders in there, separating "MVC" from "the rest". Depending on the size of the project of course, smaller projects I would do as the previous answers and just create new folders with descriptive names.
精彩评论