LINQ - how many layers of linq to sql? - Asked By waseem kaleem on 11-Sep-11 01:07 AM

How many layers of linq to sql and provide article to define each one?
is what function "services layer" in linq to sql?
Reena Jain replied to waseem kaleem on 11-Sep-11 01:34 AM
Hi,

LINQ to SQL is not an architecture. It's a Data Access tool. It should only fit within the DAL. If you decide that you don't like Linq To SQL, how easily could you swap it for Entity Framework or nHibernate, for example? You should only need to remove the DAL and replace it. If you have to touch the UI to change L2S, you have no separation at all.

- Data Acess/Business Layer: which contains only *.dbml files which is my database and

- UI Layer: which contains *.aspx files.

Linq2SQL, EF, NHibernate are just for 3) DAL

Have a read of this: N-Tier and Remote Applications With LINQ TO SQL.
Reena Jain replied to waseem kaleem on 11-Sep-11 01:40 AM
Hi,

LINQ to SQL is not an architecture. It's a Data Access tool. It should only fit within the DAL. If you decide that you don't like Linq To SQL, how easily could you swap it for Entity Framework or nHibernate, for example? You should only need to remove the DAL and replace it. If you have to touch the UI to change L2S, you have no separation at all.

- Data Acess/Business Layer: which contains only *.dbml files which is my database and

- UI Layer: which contains *.aspx files.

Linq2SQL, EF, NHibernate are just for 3) DAL

Have a read of this: N-Tier and Remote Applications With LINQ TO SQL.
smr replied to waseem kaleem on 11-Sep-11 01:45 AM
hi

There are several ways to design a data access layer.  .NET Framework 3.5 introduced several LINQ providers, including LINQ to SQL. This was intended to provide LINQ over relational databases but was implemented only for SQL Server.  .NET 3.5 SP1 added the Entity Framework. This allowed the use of LINQ alongside any database including SQL Server, Oracle, DB2, MySQL, etc.

 LINQ to SQL will be supported for Rapid Application Development with a SQL Server back end.


MultiTierArchitecture

refer


Jitendra Faye replied to waseem kaleem on 11-Sep-11 02:50 AM
LINQ stands for Language Integrated Query and is a DSL within C# for querying data. It is implemented by language extensions to C# 3.0. It allows us to concisely express queries against our collections of data. LINQ comes in a variety of flavours: Objects, SQL, and XML which allow us to query different sources of data. LINQ is an internal DSL. The query expressions that we write are declarative statements about what we want, to project, restrict, etc

There are a number of ways to layer our model. Here we divide it up into presentation, application services, domain, and infrastructure services.  

The presentation layer is responsible for showing information to the user and allowing the user to send us commands.

The application service layer co-ordinates the response of the domain layer to a request from the presentation layer. Its responsibilities do not include business logic, instead it has organizational or workflow logic that initiates work within the domain. Its state reflects the progress of tasks not the state of the domain.

The domain layer is the heart of the application, where the information that the business cares about is held and manipulated and rules are applied.

The infrastructure layer provides services that allow the other layers to work such as persistence and communication. Both the domain layer and the application services layer may use the infrastructure layer.

follow this link-

http://codebetter.com/iancooper/2007/11/30/architecting-linq-to-sql-applications-part-2/

http://blogs.msdn.com/b/olavt/archive/2007/08/30/how-does-linq-affect-the-architecture-of-your-application.aspx

hope this will help you.