4

I'm currently doing a custom attribute, and did some 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!

1
  • 1
    Stuff like that should be able to go just about anywhere you feel right with, most commonly I've seen classes like that end up under a Common or Infrastructure folder and related. Commented May 27, 2011 at 13:10

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.