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.
This webpage describes one video of hundreds hosted on this website. HOWEVER …
This video has been removed from our collection.
Read why I decided to keep old pages like this around. Or better yet, visit the home page … its the best place to get started.
About this video:
Duration: 25 Minutes, 1 Seconds
Recorded Using: Visual Studio 2008 (all versions)