AITeky Learn

AiTeky Original Interactive Learning & Practice Intermediate

C# and .NET: lazy queries, async calls and cleaning up

See why a query written once can run many times (and cost the database each time), how awaiting calls one after another differs from starting them together, and how resources that are not memory still need to be released.

C# is a general-purpose language and .NET is the platform it runs on: libraries, a runtime that manages memory for you, and tools. Much everyday C# code does three things: queries collections and databases (with LINQ), calls other services without blocking (with async and await), and uses resources such as files and connections that must be released.

This course models those three ideas with small Python programs you can run in your browser. Python stands in for C#; the code is not C#, but the behaviour (lazy queries, overlapping waits, deterministic cleanup) is the real behaviour. Check Microsoft's documentation for exact syntax and library details. All numbers are made up.

  • Learn lessons explain one idea at a time and let you run it.
  • Industry ready lessons decide and justify, and end with interview questions.

No C# experience is assumed. Basic Python helps.

Locked. Sign up free

Learn

Understand each idea with everyday examples. No coding background needed.

  1. 01 30 min Free sample 🔒 AiTeky Pass A query is a recipe, not a result Model LINQ-style queries as recipes that run only when you read them, count how many times the data source is touched when the same query is read twice, and see why storing the result once (materialising it) prevents surprise repeats and stale data.
  2. 02 30 min 🔒 AiTeky Pass Waiting together instead of one by one Model a page that needs four slow calls (a database, two services and a file), compare awaiting them one after another with starting them all and awaiting them together, add a limit on how many run at once, and see what happens when one call is slower than the rest or fails.

Industry ready

Real problems from real jobs, and the questions interviewers ask about them.

  1. 03 35 min 🔒 AiTeky Pass On the job: the API that ran out of connections A web API freezes every few hours with errors about no free database connections. Model a connection pool, show how a few error paths that never release their connection drain it, compare four fixes (always release with a using block, a bigger pool, a shorter timeout, restarting the service) by effect and risk, choose, and write the incident note.

We use essential cookies to run the site. With your permission we also set one anonymous ID to count unique visitors, and analytics cookies to see which pages help learners. Cookie notice

Join AiTeky Learn. It's free.

Create a free account to track your progress, save items for later and get study suggestions.

Sign up free Log in