Prev | Current Page 220 | Next

Satheesh, N Kumar

"LINQ Quickly"

WriteLine("itemID:" + rowItemcats.itemID + " Category
Type:" +
rowItemcats.categoryType + " ItemName:" + rowItemcats.itmName);
}
Querying Typed DataSets
The structure of DataSets is similar to that of a relational database; it exposes a
hierarchical object model of tables, rows, columns, constraints, and relationships.
Typed DataSets derive the schema, which is the structure of the tables and columns,
and are easier to program. An un-typed DataSet has no corresponding schema.
Un-typed DataSets also contain tables, rows, and columns, but they are exposed as
collections. Typed DataSet class has an object model in which its properties take on
the actual names of the tables and columns. If we are working with typed DataSets,
we can refer to a column directly as follows:
var categoryID = dataSetDeserts.Tables[0].CategoryID;
The following query uses un-typed DataSets:
var itemCategories = from cats in categories
join item in items
on cats.Field("CategoryID") equals
item.Field("CategoryID")
where cats.


Pages:
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232
dakolen dieta light życzenia śmieszne dowcipy katalog stron