LINQ in Multi-tier Applications
If you had the chance to work with LINQ, the latest Object Relational Mapping tool (ORM) added to the .NET 3.5 platform, then you understand how LINQ maps your database structure into several classes in your application. It creates for each table an entity class that has its properties mapped to the columns of the table in context. The whole point of ORM tools is to bring the database structure up to the language’s level so that your code would be aware of the structure at compile time. Nowadays developers tend to divide their application’s architecture into several distinct layers, usually 3 layers:
- Physical layer which encapsulates code that accesses your database one way or another
- Business layer which usually has your business logic code
- User interface layer which is usually a desktop .NET application or an ASP.NET application