Change Default Namespace when creating Class in Folder (Visual Studio)
To change the default namespace:
Right click on the project, go to properties and under the 'Application' tab there is a 'Default namespace' field.
Note that this doesn't answer your exact question though, it depends on your folder. You basically you need to rename that folder to 'Model'.
If you have ReSharper installed, right click on the folder in your solution you want to be excluded from namespaces and select properties. In the properties pane, select False
for Namespace Provider and that will make Visual Studio ignore the folder when generating namespaces in new files.
There are 4 schools of thought here:
- edit it manually
- live with it
- change the class template (or export a second class template)
- create the file outside the sub-directory, then drag it in
I tend to use the 4th; it is quicker than editing, and less hassle than changing the templates