ContextModelSnapshot and Manual Migrations in EF7

entity-framework-core

Question

With Entity Framework 7 I created the first migration and got two files:

20151206224643_InitialDatabaseSetup.cs
ContextModelSnapshot.cs
  1. What is ContextModelSnapshot for?

  2. What if I need to change a migration code? For example, using SQL code to create a procedure or add filestream?

  3. Can, or should I, add empty migrations and setup the code manually?

1
2
12/6/2015 10:49:54 PM

Popular Answer

What is ContextModelSnapshot for?

Unlike EF 6, in EF Core there is no more snapshots per migrations stored in database. Instead, there is one snapshot per context.

Find out more at http://mehrandvd.me/2016/02/18/entity-framework-core-migrations

Not sure about your 2nd and 3rd questions.

4
3/28/2016 1:56:04 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow