مشخصات کتاب
-
N Satheesh Kumar
-
2007
-
انگلیسی
-
30907
-
959
-
0
LINQ Quickly
Table of Contents
Preface 1
Chapter 1: Overview 5
LINQ Architecture 5
Integration with SQL 7
Integration with XML 7
Support for C# 3.0 Language Features 8
Anonymous Types 9
Object Initializers 11
Collection Initializers 12
Partial Methods 13
Implicitly Typed Local Variables 14
Extensions 15
Expressions 16
Lambda Expressions 16
Query Expressions 18
Expression Trees 22
Summary 24
Chapter 2: LINQ to Objects 25
Array of Integers 25
Collection of Objects 27
Reading from Strings 29
Reading from Text Files 30
Summary 32
Chapter 3: LINQ to XML 33
Features 33
Classes and Hierarchy 34
XElement Class 36
XAttribute Class 36
XDocument Class 36
Other Classes 36
LINQ to XML with Other XML Technologies 38
LINQ with XmlReader 40
LINQ with XSLT 41
LINQ with MSXML 41
Functional Construction 41
XML Names 44
Loading and Traversing XML 45
Loading XML 46
Traversing XML 46
Data Manipulation 50
Inserting or Adding Elements to XML 50
Inserting or Adding XML Attributes 54
Deleting XML 55
Updating XML 56
Deleting XML Attributes 56
Updating XML Attributes 57
Outputting and Streaming XML 57
Streaming XML 58
Querying XML 59
Query Operators 59
Queries 60
Ancestors and Descendants 63
XML Transformation 64
Dictionaries 65
Convert Dictionary to XML 65
Create Dictionary from XML 66
Writing XML as Text Files and CSV Files 67
Reading from CSV Files 69
LINQ to XML Events 71
XML Literals and Embedded Expressions in Visual Basic 73
Summary 75
Chapter 4: LINQ to SQL 77
Working with Databases Using DataContext 77
Entity Classes 78
Attributes 81
Database Attribute 81
Table Attribute 82
Column Attribute 82
Association Attribute (Foreign Keys) 84
Relationships 85
Function Attribute 87
Parameter Attribute 88
Inheritance Mapping Attribute 88
Creating and Deleting Databases 89
DataContext Methods 90
Data Manipulation 93
LINQ to SQL Queries 96
Identifying Objects 99
Queries with Multiple Entities 100
Remote Queries and Local Queries 100
Deferred Loading 101
Immediate Loading 103
Projections 105
Constructing XML 106
Joins 107
Raw SQL Query 109
Query Result 109
Stored Procedures 110
User-Defined Functions 116
Class Generator Tool 117
Transactions 121
Handling Concurrency Conflicts 122
Object Relational Designer (O/R Designer) 123
Summary 140
Chapter 5: LINQ over DataSet 141
Loading Data into DataSets 142
Querying Datasets 144
Sequence Operator 146
Querying Typed DataSets 147
DataSet Query Operators 148
CopyToDataTable 149
LoadDataRow 149
Intersect 150
Union 150
Except 151
Field<T> 151
SetField<T> 152
Projection 152
Join 153
SequenceEqual 154
Skip 154
Distinct 154
Summary 154
Chapter 6: LINQ to XSD 155
Un-typed XML 157
Creating Typed XML using Visual Studio 159
Object Construction 163
Load Method 165
Parse Method 165
Save Method 166
Clone Method 166
Default Values 167
Customization of XML Objects 167
Mapping Time Customization 167
Compile Time Customization 168
Post Compile Customization 169
Using LINQ to XSD at Command Line 169
Summary 169
Chapter 7: Standard Query Operators 171
Restriction Operators 173
Where 173
OfType 174
Projection Operators 176
Select 176
SelectMany 177
Join Operators 179
Join 179
GroupJoin 181
Concatenation Operator 183
Concat 183
Ordering Operators 183
Set Operators 186
Distinct 186
Except 187
Intersect 188
Union 189
Grouping Operators 190
GroupBy 190
ToLookup 191
Conversion Operators 191
AsEnumerable 191
Cast 192
OfType 193
ToArray 193
ToDictionary 194
ToList 195
ToLookup 196
Equality Operators 197
SequenceEqual 197
Generation Operators 198
Empty 198
Range 198
Repeat 198
Quantifiers 199
All 199
Any 199
Contains 200
Aggregation Operators 201
Average 201
Count 202
LongCount 202
Min 202
Max 203
Sum 204
Aggregate 204
Partitioning Operators 205
Take 205
Skip 206
TakeWhile 207
SkipWhile 207
TakeWhile 208
Element Operators 209
DefaultIfEmpty 209
ElementAt 210
ElementAtOrDefault 210
First 211
FirstOrDefault 212
Last 212
LastOrDefault 213
Single 214
SingleOrDefault 215
List of Query Operators 216
Query Operator Equivalent Expressions 219
Summary 219
Appendix A: Building an ASP.NET Application 221
Appendix B: LINQ with Outlook 229
Index 233