Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






Task 3 – Overview of LINQ To SQL, LINQ To XML, and LINQ to DataSet

As shown here LINQ provides a language integrated query framework for .NET. The features shown in the previous tasks can be used to query against relational databases, datasets, and data stored in XML.

This overview demonstrated LINQ To Objects (In-Memory Collections). For a deeper understanding of using LINQ with databases, datasets, and XML, see the LINQ Project Overview Hands On Lab.

Lab Summary

 

 

In this lab you preformed the following exercises:

· Use of Automatically Implemented Properties · Easy Initialization with Object and Collection Initializers · Implicitly Typed Local Variables and Implicitly Typed Arrays · Extending Types with Extension Methods · Working with Lambda Expressions · Using Lambda Expressions to Create Expression Trees · Understanding Queries and Query Expressions · Anonymous Types and Advanced Query Creation

 

Through the eight exercises you explored the new language features available in C# 3.0. Many of the features, such as implicitly typed local variables, extension methods, lambda expressions, and object initializers, provide a new level of convenience for C# developers. Together, the features create an expressive language for data access, allowing you to apply LINQ technology to your work, increasing your productivity as you are able to work with data as objects.

 


Appendix: Code Samples (used if not running sequentially through the lab)

 

This section contains the starting blocks of code required if skipping sections. All code written in this lab is contained in one file: program.csEach exercise in this lab is structured to build upon the code written in the previous exercises. Compiled in this appendix are the complete sets of code that are generated by each exercise (the entire program.cs file). For example: If you wish to start at exercise 5, then you may start with the code provided for you in the exercise 5 below.


Date: 2015-02-03; view: 836


<== previous page | next page ==>
Task 2 – Additional Query Expressions Using Anonymous Types | Exercise 1: The first task in this exercise explains how to open Visual Studio and create a new project.
doclecture.net - lectures - 2014-2024 year. Copyright infringement or personal data (0.008 sec.)