ASP.NET MVC: The correct location for custom classes, attributes, etc.

I am currently executing a custom attribute and executing some custom classes for one of my ASP.NET MVC projects.

I was wondering if there is room for accommodation? I mean, some kind of correct path name or something like that.

Like controllers, in controllers \, models in models \ etc.

Any suggestion is welcome!

Thanks!

+4
source share
2 answers

If these attributes are custom action filters, I would put them in the Filters sib folder. If they submit validator data annotations to the Validators folder, ... Therefore, based on their function, I would find a name.

+3
source

As I usually do, this is to add a separate library project and put it there, in the descriptive folders there, separating the "MVC" from the "rest". Depending on the size of the project, of course, small projects that I would do as previous answers, and just create new folders with descriptive names.

0
source

All Articles