Querying a databaseintermediate
IQueryable lets you build a query in pieces and send one efficient SQL statement — the classic mistake is fetching every row into memory and filtering there.
The scaffolder saw a renamed property and generated a drop and an add. It would have passed review and deleted every customer name in production. Rewrite it so the data survives, and so adding a required column works on a table that already has rows.
Running Up on a populated table changes shape and loses nothing, and Down puts it back.
Published in full, before you start — every point is one of these and there is nothing else.
IQueryable lets you build a query in pieces and send one efficient SQL statement — the classic mistake is fetching every row into memory and filtering there.
Creating a record means deciding its id, checking it before it lands, and never modifying the list you were handed — because a half-written row is harder to find and fix than a rejected request.