.NET Practice Exercises
Build production-ready .Net backends through hands-on challenges, one concept at a time.
Dependency Injection
Learn how the container builds your objects instead of you: registering an interface against its implementation, letting constructors receive what they need rather than calling new, resolving every implementation of one interface at once, and choosing the lifetime that makes state shared or fresh.
Request Tracking Service Lifetimes
This problem covers choosing how long each service should live, so a counter shared by the whole application keeps counting while a value that belongs to one request starts fresh every time.
Order Service Constructor Graph
This problem covers letting the container build a whole chain of collaborating objects, so a service and everything beneath it arrives ready to use instead of being constructed by hand at the top.
Layered Discount Pricing
This problem covers applying a chain of discount rules to a price one after another, with the rules coming from the container as a set rather than being listed by hand, and the order they were registered in deciding the order they apply.
Notification Dispatch Center
This problem covers sending one message through every notification channel the application has, counting deliveries across the whole application while keeping each request's own details separate, and reporting what each channel did.
Configuration and Options
Learn how an application reads its settings: binding a configuration section to a typed class, layering files and environment variables so the right value wins, and refusing to start when a setting is wrong.
Typed Smtp Settings
This problem covers reading email server settings out of configuration into a typed class, then using those settings to report the connection details and to preview how an email would be sent.
Environment Override Precedence
This problem covers layering settings from a base file, an environment specific file and environment variables, so each setting takes its value from the highest layer that sets it and falls back to the layer below when it does not.
Fail-Fast Options Validation
This problem covers checking configuration values as the application starts, so a bad setting stops it straight away with a message naming what is wrong, instead of failing later inside a request.
Payment Gateway Settings Module
This problem covers binding a nested block of payment settings into typed objects, checking them as the application starts, and reporting the gateway profile without ever exposing the API key itself.
Minimal APIs and Routing
Learn how routes become endpoints: mapping the verbs of a resource, constraining what a URL segment will match, taking query values straight into handler parameters, and sharing one prefix across a group.
Book Catalog Endpoints
This problem covers the three basic endpoints of a resource, listing everything, fetching one by its id, and adding a new one, each answering with the right status code and pointing the caller at what was just created.
Route Constraints For Order Lookup
This problem covers letting the routing table itself reject a badly formed URL, so a lookup by order number only matches whole numbers and a lookup by tracking code only matches a real code, and anything else never reaches the code behind it.
Search Endpoint Query Binding
This problem covers taking search filters straight from the query string as typed handler parameters, each falling back to a sensible default when the caller leaves it out, and turning away a value that is not of the right type.
Task Tracker API With Route Groups
This problem covers building the five endpoints of a task tracker behind one shared URL prefix, so listing can be filtered, creating points at what it made, and updating or deleting something that is not there says so.
Model Binding and Validation
Learn how a request turns into objects your code can trust: binding a JSON body to a typed record, pulling values from headers and the query string, stating the rules on the model itself, and reporting every field that failed.
Signup Payload Binding
This problem covers taking a JSON signup body straight into a typed record on the handler, filling in defaults for anything left out, and turning away a body that cannot be read or arrives as the wrong kind of content.
Annotated Product Validation
This problem covers stating the rules a product has to satisfy on the product itself, then storing one that passes and answering one that fails with the names of the fields that were wrong.
Header And Query Metadata Binding
This problem covers pulling one value out of a request header and another out of the query string straight into handler parameters, requiring the header, defaulting the query value, and answering differently depending on which one is wrong.
Order Submission Endpoint
This problem covers checking an order that arrives across three places at once, the URL, a request header and the body, then reporting every part that was wrong together, and storing the order only once all of it holds.
Middleware
Learn how every request passes through a pipeline before and after your endpoint: measuring and logging a call, answering one yourself without going further, putting the stages in an order that works, and carrying one id through all of them.
Request Timing Logger
This problem covers timing every request as it passes through the application and leaving one log entry for it, recording the method, the path, the status it ended with and how long it took, without changing the answer itself.
Maintenance Mode Switch
This problem covers putting a switch in front of the whole application, so that while it is on every request is turned away with the same notice and told when to come back, and while it is off nothing about the normal answers changes.
Pipeline Order Repair
This problem covers putting the stages a request passes through into the right order, so failures anywhere are caught and turned into a proper answer, and a protected endpoint is guarded before it ever runs.
Correlation ID Pipeline
This problem covers giving every request one id that follows it all the way through the application, so each stage and each log line reports the same one, and it comes back on the response whatever happened to the request.
LINQ and Collections
Learn how to turn stored data into an answer: filtering and projecting to just what a caller should see, grouping and aggregating into a report, and settling a query's result so it stops changing underneath you.
Catalog Filter And Projection
This problem covers turning the catalog the warehouse keeps into a listing a customer can see, dropping what is out of stock or outside the asked-for price range, ordering what is left by price, and leaving the internal fields behind.
Sales Grouping Report
This problem covers gathering recorded sales into one line per category, reporting how many each holds, what they add up to and what they average, and listing the richest category first with ties settled by name.
Deferred Execution Bug
This problem covers taking a handover report and settling it then and there, so the copy kept says what the log said at that moment however the log changes afterwards, while a fresh run always reports the log as it stands.
Top Customers Analytics
This problem covers ranking customers by what they have spent, reporting how many orders each placed and what they average, and pinning a ranking so the pinned board keeps saying what it said when it was taken.
Async Fundamentals
Learn how an application stays responsive while it waits: awaiting work instead of blocking on it, starting several calls at once so they overlap rather than queue, passing the caller's cancellation through so giving up actually stops the work, and letting one failing source cost its own result rather than the whole answer.
Non-Blocking Report Endpoint
Parallel Price Fetch
Cancelable Long Export
Aggregated Dashboard Loader
Advanced Dependency Injection
Learn how a container is taught to build things it cannot construct on its own: registering a service through a factory delegate that decides at resolve time, telling several implementations of one interface apart by key, registering an open generic once so every closed type resolves from it, and keeping the lifetime each consumer gets correct.
Factory-Based Registration
Keyed Payment Providers
Open Generic Repository Registration
Pluggable Export Engine
Options and Feature Management
Learn how an application reads its settings: binding a configuration section to a typed class, giving each tenant its own named set so one never overwrites another, reading values afresh per request so a change is honoured by the very next one, keeping a long lived reader in step as settings change, and refusing to start when a setting is wrong.
Reloadable Feature Settings
Named Tenant Options
Options Change Notifications
Feature Flag Service
Middleware, Filters and Error Handling
Learn how a request is shaped before and after it reaches your code: validating input in a filter attached to the endpoint rather than inside the handler, turning any unhandled failure into one consistent error body, limiting how often a caller may ask, and ordering those stages so each sees what it is meant to see.
Endpoint Validation Filter
Global Exception Handler
Api Rate Limiter
Hardened Public API Pipeline
EF Core Fundamentals
Learn how to make the database do the work: loading related rows in one command instead of many, projecting to just the columns a page shows, filtering, sorting and paging in SQL rather than in memory, and reading without tracking when nothing is going to be saved.
Library Loans Query
Read-Only Reporting Queries
Paged Product Listing
Authentication and Authorization
Learn how an API decides who a caller is and what they may reach: validating a bearer token against the issuer, audience, signature and expiry it is configured with, gating routes with a named policy rather than a check inside the handler, and writing a custom requirement that judges a caller from their own claims
Jwt Protected Endpoints
Policy-Gated Admin Area
Minimum Tenure Requirement
Multi-Tier Access API
About this path
This path covers the building blocks of a .NET 10 web app: dependency injection, configuration, minimal APIs and routing, model binding and validation, middleware, and LINQ. You should be able to read and write basic C# before you start. No earlier ASP.NET Core experience is needed. The LINQ module uses real reporting tasks, such as grouping sales and finding top customers.
Frequently asked questions
4>What will I practice in this path?
6 modules: Dependency Injection, Configuration and Options, Minimal APIs and Routing, Model Binding and Validation, Middleware and LINQ and Collections. More modules are on the way.
>How many challenges are there, and how hard are they?
24 challenges, all easy.
>What does this path run on?
Challenges run on .NET 10.
>Do I need to install anything?
No. Every challenge runs in a browser-based IDE with everything already set up, and your code is graded automatically against a test suite.
