Video Tutorial Library:

C# 301 - C# 3.0 Language Enhancements :

CS301_07_02 - LINQ Projection

Tags: C# , 2008 , LINQ
In this video we'll start diving deeper into both the LINQ to Objects method syntax as well as the language integrated query syntax shortcuts.  We'll be talking about projection, and Projection (from a LINQ perspective) is basically shaping or molding the data that is returned from a LINQ query to include just the stuff you need (as opposed to retrieving every field of the object.)  You can use this to: 1) Convert the data from one type to another (i.e., copy the value from a property  in Type A to a property in Type B), 2) Flatten the data from a hierarchy into a non-hierarchical form.  The new type could be something in in the framework, a type you created, or an anonymous type.  We'll start with simply selecting an entire sequence from a collection.  Then we'll start selecting single fields or new instances of a named type, and finally select data into anonymous types.

Downloads:

Sign up today to access downloads.
CS301_07_02 - LINQ Projection
Duration: 25 Minutes, 1 Seconds
Size: 30.09M
Recorded Using: Visual Studio 2008 (all versions)

Get Free Videos via Email

Sign up for our newsletter and receive links to free videos and more.

Subscribe

We don't rent/sell/or commit other evil deeds with your email address. See our Privacy Policy.