.NET Training

Summary

Customisable .NET training that can be delivered online or at your offices. There’s also a public course in London on 20 - 24 June

The pace and content of the course can be adjusted to match the background of the participants. Sections that are not relevant to your requirements can be removed. The content listed in the next section includes programming in C# 10, interacting with a database, building a REST API with a React Client and hosting the application on Azure. There are also modules for building an ASP.NET MVC application and a WPF desktop application.

Course content

1. Programming in C#
Review of C# fundamentals                                                            
Video
  • This is intended as a recap for developers who are already familiar with object-oriented programming but may not be up to date with best practices and new additions to the language.
  • Overview of .NET 6 and C# 10 including the CLR, CTS and CLS
  • Syntax including data types, operators and statements
  • Class design including UML, encapsulation, expression-bodied members, auto-implemented properties, overloaded constructors, inheritance and overriding, abstract classes, structs
  • Handling and throwing exceptions; recursive methods
  • Passing parameters by reference with the in, out and ref keywords
  • Unit testing with xUnit, including parameterised tests and substituting dependencies for mock objects with the Moq library.
2 units
2. Collections
Comparing classes and interfaces in the collections framework
  • The collections interface hierarchy with IList and IDictionary implementations. Polymorphism and numeric formatting.
  • Using FIFO and LIFO collections including Stack, Queue and LinkedList
  • ISet implementations including HashSet and SortedSet. Overriding Equals and GetHashCode, implementing IComparer
  • Relative speeds of collection methods and Big O notation
  • Writing a generic class that implements ICollection, using the Array class. Using the yield keyword to get an Enumerator
1 unit
3. LINQ
Using Language-Integrated Query to interrogate collections.
  • Using LINQ Query syntax
  • Understanding LINQ method syntax, including extension methods, generic delegates, lambda expressions, covariance and contravariance
  • Filtering, selecting and aggregation operations
  • Building a repository class, using a HashSet persisted to a file with JsonSerializer. Unit testing the repository with XUnit and Moq.
1 unit
4. SQL
Communicating with a SQL Server database.
  • Transact-SQL types. Creating tables, insert, update, delete and select statements. Primary and foreign keys, table joins
  • Getting a connection, IDisposable types and using statements. Transactions; pessimistic and optimistic concurrency control
  • Building repository classes and writing integration tests
1 unit
5. Entity Framework
Object-relational mapping with Entity Framework Core.
  • Configuring a DbContext, data seeding. Test-driven development
  • Entity classes, generated values, foreign key properties, data annotations, optimistic concurrency control
  • Managing database schemas, using migrations to sync the data model with the database; reverse engineering
  • Querying with LINQ, eager and lazy loading of related data
  • Saving data; entity state; adding, modifying and removing tracked entities
  • Asynchronous methods, the Task class, using the await keyword, starting a background thread with Task.Run
  • Building a Service Layer for separation of business logic (services) and data-access logic (repositories)
2 units
6. Web API
Creating RESTful services with ASP.NET Core.
  • Controller classes; HTTP methods and status codes; route mapping and constraints
  • Configuring dependency injection; CORS; debugging with Postman
  • Unit testing the controller with xUnit and Moq
  • Generating a SHA256 hashed password
  • Claims-based authentication, symmetric encryption, generating a JSON Web Token (JWT), authenticating the JWT on the server
  • Writing controller methods that call the service layer, including the JWT in the HTTP header
  • Creating a release build and deploying the service
3 units
7. React
A JavaScript library for building user interfaces
  • Understanding toolchains, packages and modules. Using Visual Studio Code with Node Package Manager to create a single page app
  • Javascript and Typescript syntax review including data types, operators, variable declaration and scope, control structures, objects, constructors, arrays, inline and arrow functions
  • JSX. Components and props. Handling events
  • State and lifecycle with state and effect hooks; the virtual DOM; debugging with React developer tools
  • Conditional rendering, extracting components into a hierarchy, lifting shared state; HTML forms and controlled components
  • Generating HTML lists and tables; array functions including map and filter; for loops
  • Connecting to a REST service; promise objects and async functions
  • Authentication; obtaining a JSON Web Token and including the token in HTTP requests
  • Creating a production build and deploying the application
4 units
8. Azure
Configuring Azure Platform as a Service (PaaS).
  • Using the Azure command-line interface (CLI) to create resources
  • Creating an Azure SQL database and configuring firewall rules
  • Creating a Web App that can access the database uing Azure Active Directory Authentication
  • Using a Key Vault to store secrets
  • Local Git deployment to Azure App Service
1 unit
9. ASP.NET MVC
Web application framework that implements the model–view–controller pattern
  • Using the MVC design pattern to decouple the user-interface, data and application logic
  • Controllers, views and Razor syntax. HTTP methods and status codes
  • Configuring dependency injection and routing
  • Scaffolding views; tag helpers; layout pages; Bootstrap
  • Razor pages and model binding
  • Claims-based authentication with ASP.NET Core Identity. Scaffolding Register and Login pages
  • Writing controller methods that call the service layer. Data annotations and model state. client-side validation with jQuery. Preventing CSRF attacks
  • Unit testing the controller with xUnit and Moq
  • Creating a release build and deploying the application
3 units
10. Windows Presentation Foundation
WPF is a UI framework that creates desktop client applications
  • Windows Presentation Foundation is a framework for building desktop applications on Windows
  • XAML controls and layout panels; delegates and events; styles and resources
  • Data binding; dependency properties; type converters; the DataGrid control
  • Using the Model-View-ViewModel (MVVM) pattern to separate presentation and business logic from the user interface. Configuring dependency injection
  • Calling the Web API asynchronously; serializing and deserializing JSON
  • Binding control properties to the ViewModel and sending PropertyChanged events
  • Authentication; obtaining a JSON Web Token and including the token in HTTP requests to the Web API
  • Unit testing the controller with xUnit and Moq
2 units
11. Design Principles and patterns
Reusable solutions to commonly occurring problems.
  • Design principles are intended to make software more understandable, flexible and maintainable. Design patterns are reusable solutions to commonly occurring problems. The following are discussed in the context of the applications built in the previous modules
  • SOLID principles (Single responsibility principle; open-closed, Liskov Substitution Principle; Interface Segregation principle; Dependency inversion)
  • Don't repeat yourself; encapsulate what changes; favour composition over inheritance; program to an interface, not to an implementation
  • Creational design patterns: abstract factory; builder; factory method; singleton
  • Structural design patterns: adapter, decorator, façade
  • Behavioural design patterns: observer; strategy; template method
1 unit