Книга: C# 2008 Programmer

LINQ Architecture

LINQ Architecture

Figure 14-1 shows the architecture of LINQ. The bottom layer contains the various data sources with which your applications could be working. On top of the data sources are the LINQ- enabled data sources: LINQ to Objects, LINQ to DataSet, LINQ to SQL, LINQ to Entities, and LINQ to XML. LINQ-enabled data sources are also known as LINQ providers; they translate queries expressed in Visual Basic or C# into the native language of the data source. To access all these data sources through LINQ, developers use either C# or Visual Basic and write LINQ queries.


Figure 14-1 

LINQ to Entities is beyond the scope of this book. It was slated to be released later in 2008 and is not part of Visual Studio 2008.

So how does your application view the LINQ-enabled data sources?

? In LINQ to Objects, the source data is made visible as an IEnumerable<T> or IQueryable<T> collection.

? In LINQ to XML, the source data is made visible as an IEnumerable<XElement>.

? In LINQ to DataSet, the source data is made visible as an IEnumerable<DataRow>.

? In LINQ to SQL, the source data is made visible as an IEnumerable or IQueryable of whatever custom objects you have defined to represent the data in the SQL table.

Оглавление книги

Оглавление статьи/книги

Генерация: 1.066. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз