... Service-Oriented
Architecture, 3e
Beginning ASP.NET 3.5
Data Access, 2e
Beginning
C# 2008 Databases
Beginning C# 2008
Pro LINQ: Language
Integrated Query
in C# 2008
www .apress. com
SOURCE CODE ONLINE
Companion eBook
... print for content only—size & color not accurate spine = 1. 176" 624 page count
Books for professionals By professionals
®
Pro LINQ: Lan...
... into the entity classes at key
points in time.
Finally, query expressions provide that warm fuzzy feeling when first seeing a LINQ query that
makes you want to get on board with LINQ. Nothing ... October 16 , 2007 2 :19 PM
■ ■ ■
PART 2
LINQ to Objects
Rattz_789-3.book Page 51 Tuesday, October 16 , 2007 2: 21 PM
CHAPTER 3 ■ LINQ TO OBJECTS INTRODUCTION
61
Summary
In this...
... example.
Reprinted Here for Convenience Is Listing 1- 3
using System;
using System .Linq;
using System.Data .Linq;
using nwind;
Northwind db = new Northwind(@"Data Source=.\SQLEXPRESS;Initial Catalog=Northwind");
var ... employee: 1
12/ 31/ 1999
Option records for employee: 2
6/30 /19 92
1/ 1 /19 94
4 /1/ 2003
Option records for employee: 3
9/30 /19 97
Rattz_789-3.book Page 1...
... Sum Prototype
IEnumerable<int> ints = Enumerable.Range (1, 10 );
foreach (int i in ints)
Console.WriteLine(i);
Console.WriteLine(" ");
int sum = ints.Sum();
Console.WriteLine(sum); ... understanding of LINQ to Objects and just what LINQ can
do for you, it’s time to learn about using LINQ to query and generate XML. This functionality is called
LINQ to XML and, no...
... THE LINQ TO XML API
XProcessingInstruction.Target on XProcessingInstruction Objects and
XProcessingInstruction.Data on XProcessingInstruction Objects
To update the value of a processing instruction, ... PM
CHAPTER 7 ■ THE LINQ TO XML API
2 51
<BookParticipants>
<BookParticipant type="Author">
<! Author of Pro LINQ: Language Integrated Query in C#...
... DataContext.
Listing 14 -1 contains an example of inserting a record into the database.
Listing 14 -1. Inserting a Record by Inserting an Entity Object into Table<T>
// 1. Create the DataContext.
Northwind ... Console.Out.
Listing 13 -1 contains an example.
Listing 13 -1. An Example Using the DataContext.Log Property
nwind.Northwind db =
new nwind.Northwind(@"Data Source=....
... to the query for the respective column. Listing 14 -16 contains an example programmati-
cally building a query for such an interface.
Listing 14 -16 . Programmatically Building a Query
Northwind db ... 3.5.20706 .1
Rattz_789-3C14.fm Page 442 Tuesday, October 16 , 2007 1: 27 PM
CHAPTER 15 ■ LINQ TO SQL ENTITY CLASSES
4 61
Notice that in the raising of the PropertyChanged event...
... example calling the ExecuteQuery method, in Listing 16 -18 , I will query the Customers
table.
Listing 16 -18 . A Simple Example of the ExecuteQuery Method
Northwind db = new Northwind(@"Data ... "WA" portion in single quotes like a normal SQL query. Listing 16 -19 contains the code.
Listing 16 -19 . Another Simple Example of the ExecuteQuery Method
Northwind db = n...