phase 02.
database schema in mysql matches your models or you use scaffold-dbcontext from existing db — follow instructor.
a) code-first: dotnet ef migrations add InitialCreate then dotnet ef database update — warning: may fight existing setup.sql tables. many classes instead import sql once and scaffold.
b) database-first: scaffold entities from live database — less hand-mapping.
ef can SaveChanges() a test row in dev or read SELECT without exception.
- running migrations against production docker without backup
- mismatch between ef model and actual column type
which approach did your instructor demonstrate this module?