0

Is it possible to add a migration file using DbMigrator in code instead of through the powershell commands?

Ladislav Mrnka
  • 360,892
  • 59
  • 660
  • 670
newbie_86
  • 4,520
  • 17
  • 58
  • 89

1 Answers1

0

DbMigrator is class for running migrations. Classes for creating migration are in System.Data.Entity.Migrations.Design. ToolingFacade is called by powershell commands. Other classes represents low level API for creating migration code.

Ladislav Mrnka
  • 360,892
  • 59
  • 660
  • 670
  • Thanks! Can you please expand on that a bit more? How would I add a migration using these files? Sorry, i'm very new to EF. – newbie_86 Sep 11 '12 at 07:28
  • 1
    I have never tried it, I'm just pointing you to correct classes. You must find it yourselves. You can also check [EF source codes](https://entityframework.codeplex.com/SourceControl/changeset/view/2773077f0a16#src%2fEntityFramework.PowerShell%2fMigrations%2fAddMigrationCommand.cs) to get better idea how it works. – Ladislav Mrnka Sep 11 '12 at 07:58