Migrations interview questions

15 real Migrations questions from the EF Core bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is code-first migrations?

Junior
  1. A.the workflow where C# model changes drive incremental, versioned scripts that evolve the database schema
  2. B.the command that compares the current model to the last snapshot and generates a new migration class of the differences
  3. C.a generated SQL file that checks which migrations are already applied so it can be run safely against databases at any version
  4. D.the generated file recording the model state after the latest migration, used as the baseline for diffing the next one
Reveal the answer + AI explanation — free account

2. Which term means: "the workflow where C# model changes drive incremental, versioned scripts that evolve the database schema"?

Junior
  1. A.Update-Database
  2. B.idempotent script
  3. C.Add-Migration
  4. D.code-first migrations
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.code-first migrations — the generated file recording the model state after the latest migration, used as the baseline for diffing the next one
  2. B.code-first migrations — the command that applies pending migrations to bring the physical schema up to the current model
  3. C.code-first migrations — a generated SQL file that checks which migrations are already applied so it can be run safely against databases at any version
  4. D.code-first migrations — the workflow where C# model changes drive incremental, versioned scripts that evolve the database schema
Reveal the answer + AI explanation — free account

4. What is Add-Migration?

Junior
  1. A.the command that applies pending migrations to bring the physical schema up to the current model
  2. B.the workflow where C# model changes drive incremental, versioned scripts that evolve the database schema
  3. C.a generated SQL file that checks which migrations are already applied so it can be run safely against databases at any version
  4. D.the command that compares the current model to the last snapshot and generates a new migration class of the differences
Reveal the answer + AI explanation — free account

5. Which term means: "the command that compares the current model to the last snapshot and generates a new migration class of the differences"?

Junior
  1. A.Add-Migration
  2. B.model snapshot
  3. C.code-first migrations
  4. D.Update-Database
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Junior
  1. A.Add-Migration — the workflow where C# model changes drive incremental, versioned scripts that evolve the database schema
  2. B.Add-Migration — the generated file recording the model state after the latest migration, used as the baseline for diffing the next one
  3. C.Add-Migration — a generated SQL file that checks which migrations are already applied so it can be run safely against databases at any version
  4. D.Add-Migration — the command that compares the current model to the last snapshot and generates a new migration class of the differences
Reveal the answer + AI explanation — free account

7. What is Update-Database?

Junior
  1. A.a generated SQL file that checks which migrations are already applied so it can be run safely against databases at any version
  2. B.the workflow where C# model changes drive incremental, versioned scripts that evolve the database schema
  3. C.the generated file recording the model state after the latest migration, used as the baseline for diffing the next one
  4. D.the command that applies pending migrations to bring the physical schema up to the current model
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Junior
  1. A.Update-Database — the command that compares the current model to the last snapshot and generates a new migration class of the differences
  2. B.Update-Database — the command that applies pending migrations to bring the physical schema up to the current model
  3. C.Update-Database — the workflow where C# model changes drive incremental, versioned scripts that evolve the database schema
  4. D.Update-Database — the generated file recording the model state after the latest migration, used as the baseline for diffing the next one
Reveal the answer + AI explanation — free account

10. What is model snapshot?

Mid
  1. A.the command that compares the current model to the last snapshot and generates a new migration class of the differences
  2. B.a generated SQL file that checks which migrations are already applied so it can be run safely against databases at any version
  3. C.the generated file recording the model state after the latest migration, used as the baseline for diffing the next one
  4. D.the workflow where C# model changes drive incremental, versioned scripts that evolve the database schema
Reveal the answer + AI explanation — free account

11. Which term means: "the generated file recording the model state after the latest migration, used as the baseline for diffing the next one"?

Mid
  1. A.code-first migrations
  2. B.Add-Migration
  3. C.model snapshot
  4. D.Update-Database
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.model snapshot — a generated SQL file that checks which migrations are already applied so it can be run safely against databases at any version
  2. B.model snapshot — the command that applies pending migrations to bring the physical schema up to the current model
  3. C.model snapshot — the workflow where C# model changes drive incremental, versioned scripts that evolve the database schema
  4. D.model snapshot — the generated file recording the model state after the latest migration, used as the baseline for diffing the next one
Reveal the answer + AI explanation — free account

13. What is idempotent script?

Senior
  1. A.the generated file recording the model state after the latest migration, used as the baseline for diffing the next one
  2. B.the command that applies pending migrations to bring the physical schema up to the current model
  3. C.the command that compares the current model to the last snapshot and generates a new migration class of the differences
  4. D.a generated SQL file that checks which migrations are already applied so it can be run safely against databases at any version
Reveal the answer + AI explanation — free account

14. Which term means: "a generated SQL file that checks which migrations are already applied so it can be run safely against databases at any version"?

Senior
  1. A.Add-Migration
  2. B.model snapshot
  3. C.idempotent script
  4. D.Update-Database
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Senior
  1. A.idempotent script — the generated file recording the model state after the latest migration, used as the baseline for diffing the next one
  2. B.idempotent script — the command that applies pending migrations to bring the physical schema up to the current model
  3. C.idempotent script — the workflow where C# model changes drive incremental, versioned scripts that evolve the database schema
  4. D.idempotent script — a generated SQL file that checks which migrations are already applied so it can be run safely against databases at any version
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Migrations free