Namespace within a project or separate project
I'm trying to read about best practices in C# development. I came across people creating different class library projects within a solution. I have been developing solutions for C# but never create separate projects for my classes. Though, some of my projects were small. To separate my namespaces, I normally create folders. Are there any good reason why I should create a separate project for my class modules?
Reason to create a separate project: When we create a project of type Class Library, after the build the MSbuild process spits out an assembly/ dynamic linked library or .DLL file. This .dll file can be referenced in any project in the same or other solution. This supports the code reusability. A general rule of thumb for a web based (ASP.Net MVC) solution structure is given as below: Create a Domain Model project (Class Library project type) Create a Data Access Layer (Class Library project type) Create a Service Layer project (Class Library project type) Create a UI Layer project (ASP.Net MVC project type) Create the unit test projects (Class Library project type) for each project listed above. Hope this helps.
RijndaelManaged encrypt replacement of Enterprise Library
Error In DATABASE RESTORE
Click-Once or MSI Install
Use of Nullable Type in method gives error
MVC 5 - The type arguments for method “…” cannot be inferred from the usage. Try specifying the type arguments explicitly
Invalid attempt to read data when no data is present when getting all values from a row in a SQL Server table
DbContext Set method
Sitecore Multiline Text field, convert string to html
Async using Microsoft.Bcl.Async on .net 4.0 in Visual Studion 2012
Speeding up Parallel.ForEach iterating through datatable and rendering crystal report as byte stream
The Name 'CommonFolderQuery' does not exist in current context
caching a page with data from database asp.net
Web API 2 - restful service - URL encoded
Can't print out text from textbox with threads.
Detect slow running SQL query in C# code behind
Animating BorderBrush from DynamicResource animates everything using that brush