Namespaces in C #

I am using an ASP.NET MVC project, and every time I add a class to a folder, it makes very long namespaces.

An example :

Project = Tully.Saps.Data  
Folder = DataAccess/Interfaces  
Namespace = Tully.Saps.Data.DataAccess.Interfaces

Folder = DataAccess/MbNetRepositories  
Namespace = Tully.Saps.Data.DataAccess.MbNetRepositories

Question :
Is it better to leave only the namespace and add the use clause to the classes that access it, or change the namespace to Tully.Saps.Data for everything in this project?

+3
source share
6 answers

Leave them alone and add them. You ask to manually change such things (harder to debug, incompatible with other projects, etc.).

+1
source

, . , "using" .

, , , .

, , , .

0

FXCop, :

.

( " ", , )

, .

0

. "" . . , MVC Model/View/Controller . , , , , , .

- , , .

0

. , .

0

, (Visual Studio) , , , .
"" . "", Something.Data.Model, Something.Data.

0
source

Source: https://habr.com/ru/post/1696900/


All Articles