Join Olivia Stone for an in-depth discussion in this video Create a query, part of LINQ with C# Essential Training.
- View Offline
- Exercise Files
- The second part of a LINQ Query…is the query itself.…Once you know your dataset you need…to figure out what information you are looking for.…The query specifies what to retrieve…from the sequence or what transformations…to apply to each element in the sequence.…In the example program the range…variable cust is used to reference each element…in the sequence that will be looked at.…In the first query the where clause or operator…looks over a list of customers.…For each customer in the list I want to…know if the state property value is equal to OR.…
If the element fits the criteria…LINQ holds on to it and moves to the next…query operator.…The next operator, the select clause…specifies that I want to select the result…of the previous query as one of the data elements…to return.…An important thing to realize is that the query…isn't being executed at this point in the program.…No data is being returned yet.…So far the program has only specified…the information that will be needed to execute…the query later in the program.…
In LINQ with C# Essential Training, engineer Olivia Chiu introduces techniques for querying, updating, and transforming data with LINQ. She covers standard queries—such as finding overlaps in two datasets and creating hierarchies—as well as complex chained queries. She also shows how to group and join LINQ queries with lambda expressions, and use LINQ to query SQL databases and XML documents. Last but not least, Olivia provides tips for optimizing the performance of your queries.
- Creating and executing a LINQ query
- Returning results
- Changing the data source type
- Performing standard queries
- Working with lambda expressions
- Chaining and complex queries
- Querying SQL and XML
- Performing tree queries
- Using sequences, elements, and scalars
- Allocating memory
Skill Level Intermediate
1. Introduction to LINQ
Common use cases1m 45s
2. Basic LINQ Queries
3. Data Transformation
Return results as a new type1m 39s
4. Type Relationships
5. Standard Queries
6. Lambda Expressions
7. Complex Queries
8. LINQ to SQL
9. LINQ to XML
10. Other Operators
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.