C#/layer code in c#
what is the layer code use in visual studio 2010 using c#?
Most modern and big projects use layered architecture in their application to increase stability, re-usability, security and ease of debug process of the project.
So you create 'data access layer' in c# by creating a class or many classes with methods and properties just to connect database directly and list the tables, which means all your SQL queries and commands goes to this layer. You can build these classes as a library project and use the DLL file in your main application. Additionally
, you can use this layer as a webservice
to increase your security.
'Logic layer' includes other works that you need to process the tables or values that you bring to this layer from data layer. These are classes that you use in your application and you can think like "it is area where you make different calculations and reorders".
And finally 'presentation layer' is the top level layer that connects user to the application. Here are mostly events of UI objects and small helper methods.
You will find much more detailed explanation and sample codes in Three Layer Architecture in C# .NET
Hope that helps,