DaveWentzel.com            All Things Data

LINQ

 

First of all...what is it?  It is one of many of MS's ORM-like offerings, which I hate.  It's also an API for building data access layers.  Specifically I'm concerned with LINQ-to-SQL. 
 
Many *think* this is going to be a TSQL killer.  We'll see.  LINQ-to-see uses the LINQ syntax to query SQL Server. 
 
In a nutshell you provide a connection string and an object model is built for you to all of the tables/views you specified.  Each table/view becomes it's own class whose properties match the columns of the underlying. 
 
When you query you use a LINQ query which generates dynamic SQL that it sends to SQL Server under the covers.  Results are loaded to an in-memory collection and the app is off and running. 
 
LINQ can also change the data in the collection and again dynamic SQL is generated to handle things for you.  
 
LINQ to SQL appears to be out-of-favor as opposed to EF.  Tread cautiously.  

Add new comment