Showing posts with label LINQ. Show all posts
Showing posts with label LINQ. Show all posts

What Is LINQ?

LINQ is a uniform programming model for any kind of data. LINQ enables you to query
and manipulate data with a consistent model that is independent from data sources.
LINQ is just another tool for embedding SQL queries into code.
LINQ is yet another data abstraction layer.

LINQ is a methodology that simplifies and unifies the implementation of any kind of data
access. LINQ does not force you to use a specific architecture; it facilitates the implementation
of several existing architectures for accessing data. As with every tool, it can be used in both
good and in bad ways. To get the most out of LINQ, you will have to master it.

LINQ to SQL

•Provides object-to-relational mapping within the .NET Framework for Microsoft SQL Server databases
•Access relational data as strongly typed objects using LINQ query expressions
•Language integrated data access
–Tables and rows to classes and objects
–Builds on ADO.NET and .NET Transactions
•Mapping
–Encoded in attributes or external XML file
–Relationships map through properties
•Persistence
–Automatic change tracking
–Updates through SQL or stored procedures

Language INtegratedQuery (LINQ)

•New programming model for data access that integrates query support directly within the .NET languages
•Designed to reduce the complexity when working with data
•Query operators can be used against any collection
–Built-in examples: Select, Where, GroupBy, Join, etc.
–Extensibility model supports extending/replacing these
•Benefits
–Work with data in a consistent way, regardless of the type of data
–Interact with data as objects
–Better integration with programming languages
–Improved productivity through IntelliSense in Visual Studio