Outline updated November 2026
Modern C# Development with .NET
Class Duration
35 hours of live training delivered over 5 days.
Student Prerequisites
- Professional programming experience in at least one programming language
- Familiarity with Git for everyday version control
- No prior C# or .NET experience required
Target Audience
Professional developers learning C# from Java, Python, JavaScript, or another language, and .NET Framework developers moving to current .NET. Teams focused on AI-assisted work can continue to AI-Assisted Development with C#, desktop teams to WPF with MVVM and C#, and web teams to Build Web Apps with Blazor. Teams that store data in SQL Server can add SQL Server for Developers.
Description
This course teaches current C# for developers new to the language and for .NET Framework developers updating their skills. The first part covers records, pattern matching, union types, closed hierarchies, nullable reference types, generics, LINQ, and async/await. The second part applies the language to the Generic Host, dependency injection, configuration, logging, xUnit tests, and Entity Framework Core. Students write code with an AI coding assistant and learn to review what it generates. The last module assembles the pieces and maps .NET Framework habits to current idioms.
Learning Outcomes
- Set up solutions with the .NET SDK, the .NET CLI, and NuGet
- Choose between classes, structs, interfaces, and records
- Replace branching logic with pattern matching and switch expressions
- Model closed sets of alternatives with union types and closed hierarchies
- Write null-safe code with nullable reference types
- Design type-safe code with generics and constraints
- Choose the right collection type for each workload
- Query and transform data with lambdas and LINQ
- Write correct async code with tasks, cancellation, and async streams
- Apply recent features such as extension members and collection expression arguments
- Build services on the Generic Host with DI, configuration, and logging
- Test C# code with xUnit unit and integration tests
- Implement data access with Entity Framework Core
- Prompt an AI coding assistant for idiomatic C# and review its output
- Update .NET Framework-era code to current .NET idioms
Training Materials
Comprehensive courseware is distributed online at the start of class.
Software Requirements
Visual Studio 2026 (Community edition is sufficient) on Windows, or VS Code with the C# Dev Kit on any platform, plus the .NET 10 SDK (LTS), the .NET 11 SDK (required for C# 15 features such as union types), and Git. Access to an agentic AI coding assistant is required; a free tier is sufficient.
Training Topics
The Modern .NET Platform and Tooling
- Runtimes, SDKs, and workloads
- LTS and STS releases
- Choosing a target framework
- The .NET CLI
- Package management with NuGet
- File-based apps with
dotnet run - Visual Studio and VS Code with the C# Dev Kit
- Projects and references
- Roslyn analyzers
- AI coding assistants in daily .NET work
C# Language Core: Types and Members
- Value types, reference types, and boxing
- Classes, structs, and interfaces
- Properties and indexers
- The
fieldkeyword - Records and record structs
- Immutability and
withexpressions - Value equality
- File-scoped namespaces and top-level statements
- Access modifiers
Pattern Matching
- Type, constant, and relational patterns
- Property and positional patterns
- Switch expressions vs. switch statements
- List patterns and slice patterns
- Combining patterns with
and,or, andnot - Exhaustiveness checking
Union Types and Closed Hierarchies
- Unions vs. inheritance vs. marker interfaces
- Declaring union types
- Implicit union conversions
- Exhaustive switches over unions
- Null handling in unions
- The
closedmodifier - Matching closed hierarchies without a default arm
- Custom union types
- The non-boxing access pattern
- Unions in JSON and API payloads
Nullable Reference Types and Null Safety
- Nullable value types vs. nullable reference types
- Enabling nullable context and reading the warnings
- Null-coalescing, null-conditional, and null-forgiving operators
- Null-conditional assignment
- Designing APIs that make null explicit
- Adopting nullable annotations in existing code
Generics and Collections
- Generic types, methods, and constraints
- Covariance and contravariance
- List, Dictionary, and HashSet
- Immutable and frozen collections
- Span and ReadOnlySpan
- First-class span conversions
Delegates, Lambdas, and LINQ
- Delegates, Func and Action, and events
- Lambda expressions and closures
- LINQ method syntax and query syntax
- Projection, filtering, and ordering
- Grouping and joins
- Left, right, and full outer joins
- Deferred execution and multiple enumeration
- Readable and efficient LINQ
- When not to use LINQ
Async, Await, and Concurrency Basics
- The Task-based asynchronous pattern
- Continuations and synchronization contexts
- WhenAll and WhenAny
- Cancellation tokens
- Avoiding async void and sync-over-async traps
- Asynchronous streams with IAsyncEnumerable
- Parallel, PLINQ, and channels
Recent Language Features in Practice
- Primary constructors and collection expressions
- Collection expression arguments
- Extension blocks and extension properties
- Extension indexers
- Labeled break and continue for nested loops
- Lambda parameter modifiers
nameofwith unbound generic types- Partial constructors and partial events
- User-defined compound assignment operators
Dependency Injection, Configuration, and Logging
- The Generic Host and the application builder pattern
- Singleton, scoped, and transient lifetimes
- Configuration from appsettings, environment variables, and user secrets
- The options pattern for strongly typed settings
- Structured logging with ILogger and logging providers
Testing .NET Code
- xUnit v3 on Microsoft.Testing.Platform
- Facts, theories, and fixtures
- Test structure, naming, and meaningful assertions
- Test doubles and mocking libraries
- Integration tests with the Generic Host and real dependencies
- Testing asynchronous code without flakiness
Data Access with Entity Framework Core
- DbContext, entities, and model configuration
- Migrations and schema evolution
- Querying with LINQ
- Tracking and projections
- Eager, explicit, and lazy loading
- Saving changes and transactions
- Concurrency handling
- Compiled queries
- Raw SQL and Dapper
Production-Shaped Applications and Modernization
- Layers, boundaries, and internal APIs
- Exceptions, error handling, and result-style returns
- From .NET Framework habits to modern .NET idioms
- Reviewing AI-generated C#
- Spotting stale APIs in generated code
- Allocations and benchmarking
- Profiling basics