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?
Leave them alone and add them. You ask to manually change such things (harder to debug, incompatible with other projects, etc.).
, . , "using" .
, , , .
FXCop, :
.
( " ", , )
, .
. "" . . , MVC Model/View/Controller . , , , , , .
- , , .
. , .
, (Visual Studio) , , , ."" . "", Something.Data.Model, Something.Data.
Source: https://habr.com/ru/post/1696900/More articles:.NET 3.5 Linq Datasource and Joins - linqReject angle brackets via System.Xml.XmlWriter - c #Java VNC Libraries - javaJava EE Syntax SqlResultSetMapping - javaHow to start Oracle plsql procedure from Lisp? - oracleJavaScript and JMS integration - javaFast, Pixel Precision 2D Drawing API for a graphics application? - graphicsUsing boost-python with C ++ on Linux - c ++How can I determine with TSQL which roles are provided and the execution permissions for a particular stored procedure? - sql-serverDesigning a database for a reservation request, for example. Hotel - phpAll Articles