Database Reference
In-Depth Information
You also write the following statement to query the XML doc, where the Descendents method will
return the values of the descendant elements for the specified element of the XML document.
var products = from prodname in doc.Descendants("products") select prodname.Value;
Summary
In this chapter, we covered the essentials of using LINQ for simple queries. I introduced you to the three
flavors of LINQ, mainly LINQ to Objects, LINQ to SQL, and LINQ to XML. In the next chapter, I will cover
the ADO.NET Entity Framework.
 
Search WWH ::




Custom Search