The summary.
THE PLATFORM IS CROSS-PLATFORM NOW
Which changes hosting entirely — Linux servers and containers are available, not only Windows.
Use the modern platform on a long-term support version for new work.
ENABLE NULLABLE REFERENCE TYPES
It makes absence explicit in the type system, addressing the commonest runtime error.
NEVER BLOCK ON AN ASYNCHRONOUS OPERATION
It causes deadlocks and exhausts threads under load.
MIDDLEWARE ORDER DETERMINES BEHAVIOUR
Exception handling first, authentication before authorisation. Misordering produces confusing faults.
And be careful injecting a shorter-lived service into a longer-lived one — the captured dependency outlives its intent.
THE COMMONEST DATA ACCESS FAULT IS ONE QUERY PER ITEM IN A LOOP
Load related data explicitly, profile the queries actually produced, and keep filtering on the database side.
CHECK AUTHORISATION ON THE SPECIFIC RECORD, NOT ONLY THE ENDPOINT
Otherwise a signed-in user alters an identifier and reaches another user's data.
USE A SECRET STORE WITH MANAGED IDENTITY
It removes credentials from configuration entirely.
TEST AGAINST A REAL DATABASE OF THE SAME KIND
In-memory substitutes behave differently, and tests pass that should fail.