All tracks

Programming standards

C# / .NET

Conventions, async/await, DI, solution structure and tests in .NET.

0 / 6 lessons0%
Start track
  1. 01
    C# naming conventions and styleintro

    Naming, formatting and .editorconfig as the ProfessNet standard for C#.

    10 min
  2. 02
    async/await, Task and CancellationTokencore

    Correct asynchronous code in .NET: Task, CancellationToken propagation, avoiding deadlocks.

    12 min
  3. 03
    Dependency Injection in .NETcore

    The built-in DI container, service lifetimes and registration patterns at ProfessNet.

    11 min
  4. 04
    Solution and project structurecore

    Splitting into projects, layers and dependencies in ProfessNet .NET solutions.

    10 min
  5. 05
    Testing with xUnitcore

    Unit testing in .NET: xUnit, theories, Moq and FluentAssertions — the ProfessNet standard.

    11 min
  6. 06
    Performance and clean code in .NETadvanced

    Allocations, async streaming, LINQ and clean-code patterns in .NET services.

    12 min

Check your knowledge — quiz

5 questions · pass mark 80%. Score saved locally.

1.Under the ProfessNet standard, how do we name a private field and an asynchronous method in C#?

2.Why is the use of .Result and .Wait() on an async task forbidden in .NET application code?

3.What happens at application startup when you inject a dependency registered as Scoped (e.g. DbContext) into a Singleton service?

4.In a layered ProfessNet solution, where do repository interfaces live, and where do their implementations?

5.Which LINQ expression makes only a single pass over the probes collection?