In this tutorial you will learn more core C# and look at how to use LINQ. This will allow you to write a simple C# program that you will then compile. The program will be a Visual Studio Form application
About this Tutorial
Objectives
Delegates will learn to develop applications using C# 4.5. After completing this course, delegates will be able to:
- Use Visual Studio 2012 effectively
- Create commercial C# Web Applications
- Develop multi-threaded applications, Use WCF and LINQ
Audience
This course has been designed primarily for programmers new to the .Net development platform. Delegates experience solely in Windows application development or earlier versions of C# will also find the content beneficial.
Prerequisites
No previous experience in C# programming is required. But any experience you do have in programming will help. Also no experience in Visual Studio is required. But again any experience you do have with programming development environments will be a valuable.
Experience using a contemporary OO language such as C++ or C# would be useful but is not required.
Quick Access
Overview
- LINQ = “Language Integrated Query”
- Or to put it another way:
- A set of C# (VB etc) keywords and .NET types, methods, etc.
- …to query data from various data sources.
- The Purpose of LINQ:
- LINQ provides a unified syntax for querying data:
- Regardless of where the data is coming from.
- Better than the pre-LINQ situation, where you have to use completely different query syntaxes:
- Objects in memory – Use arrays and/or .NET collection classes APIs.
- Relational data – Use ADO.NET connections, ADO.NET DataSets, etc…
- XML – Use DOM, XmlReader, XmlWriter, etc.
- LINQ provides a unified syntax for querying data:
- LINQ Variations:
- There are several LINQ variations currently available:
- LINQ to objects.
- LINQ to XML.
- LINQ to DataSet.
- LINQ to SQL.
- LINQ to Entities.
- Plus many 3rd-party LINQ providers, such as:
- LINQ to Excel.
- LINQ to Google.
- LINQ to SharePoint.
- There are several LINQ variations currently available:
- A Few Technical Details:
- LINQ queries use SQL-like syntax:
- Via C# keywords such as select, from, where, etc…
- Can manipulate data sources that implements IEnumerable<T>.
- LINQ queries are strongly typed.
- C# / .NET features utilized by LINQ:
- Implicitly-typed local variables.
- Extension methods.
- Object/collection initialization syntax.
- Anonymous types.
- Lambda expressions.
- LINQ queries use SQL-like syntax:
Estimated Time – 1 Hour
Not what you are looking? Try the next tutorial – ADO.NET Entity Framework
Lab 1: Using LINQ with Arrays
Lab 2: Using LINQ with Collections
Lab 3: LINQ techniques
Well done. You have completed the tutorial in the C# course. The next tutorial is
13. ADO.NET Entity Framework
Copyright © 2016 TalkIT®
If you would like to see more content like this in the future, please fill-in our quick survey.