Overview
In this course participants will apply C# extended features, including definitive coverage Language Integrated Query (LINQ), to streamline the use of C# as both an object-oriented and a first-class data-manipulation language.
Objectives
At the end of Advanced C# Programming training course, participants will be able to
Prerequisites
- Knowledge at the level of Programming in C#
Course Outline
Language shortcuts
- Applying auto-implemented and lambda generated properties
- Benefiting from dynamic and implied-type declaration
Streamlining program logic
- Instantiating entity objects
- Simplifying construction with object initializers
Filtering and ordering data with lambda expressions
- Passing lambda expressions to methods (behavior vs. data)
- Calling Count, Reverse, Union, Except and other extension methods
Applying extended features
- Making code more flexible with delegates
- Parameterizing delegates and lambda expressions
- Streamlining code with Func<T,R> generic delegates
Syntax and semantics
- Coding LINQ queries
- Filtering with from, where, orderby and group
- Performing inner and outer joins
Iterating collections
- Interfacing between C# and LINQ using IEnumerable<T> and IQueryable<T>
- Issuing queries on entity and spatial types
Connecting to and reading from a database
- Inheriting Core DbContext objects
- Correlating entity classes and data tables
- Executing stored procedures and table-valued functions
Object Relational Mapping
- Employing code-first and database first mapping to generate entity classes
- Optimizing complex mapping including many to many and database inheritance
Updating a database
- Inserting, updating and deleting data when Core is integrated with .NET Framework
- Error handling and exceptions
- Committing and rolling back transactions
Dynamic Enumeration
- Comparing IEnumerable<T> and IEnumerator<T>
- The yield keyword
Advanced LINQ techniques
- Creating anonymous query results
- Retrieving composite views using nested from clauses