locked
Difference between Database.SetInitializer and Add-Migrations.Can we use both of them together. RRS feed

  • Question

  • User-1845904970 posted

    I'm new to EntityFramework. I have few Doubts

    1)When to use SetInitializer and when to use migrations?

    2)Where can we Initialize Database.SetInitializer(I mean in the context call or In the global.asax)

    3)If we have enabled migration once can we write Database.SetInitializer (new DropCreateIfModelChanges<T1>())

    4)If we want to implement Seed Data using Migrations,can we do that?

    Saturday, March 25, 2017 12:59 AM

Answers