API lessons 01–12 · refresher and exam

Two parts. Part 1 is a quick read of the key points from the first twelve lessons. Part 2 is a 40-question exam with scoring at the end. Each lesson title links to the full lesson if something needs more than a reminder.

Skip to the exam ↓

Part 1 · Refresher

01 · HTTP and REST full lesson

CodeMeaning
2xxFine (200 OK, 201 Created)
3xxLook elsewhere (301 moved)
4xxClient's mistake: 400 broken request, 401 not logged in, 403 not allowed, 404 not found
5xxServer broke (500)

02 · Solution and project planning full lesson

03 · .NET project types full lesson

TemplateRuns?Use
classlibNoShared code
consoleOnce, then stopsOne-off or timed tool
workerKeeps runningBackground jobs
webapiWaits for requestsAnswers with data (JSON)
mvc / razorWaits for requestsServer builds whole pages
mstest etc.Only when testingChecks another project

Publish a library as a NuGet package only when someone outside your solution needs it.

04 · Dependency injection basics full lesson

05 · Lifetimes: singleton full lesson

06 · State and sharing full lesson

A stateful object is never a singleton. One shared cart merges two customers.

07 · Lifetimes: transient full lesson

08 · Lifetimes: scoped full lesson

Holds...Lifetime
Settings that never changeSingleton
State that must never be sharedTransient
State of one request, shared inside itScoped

09 · JSON full lesson

10 · async and await full lesson

Avoid .Result, .Wait(), Task.Run as a fix, and async void.

11 · SQLite full lesson

12 · Unit testing basics full lesson

Part 2 · Exam

Results

Answer the questions to see how you did.

By lesson

By difficulty