Skip to content

Instantly share code, notes, and snippets.

@devlights
Created December 24, 2014 02:12
Show Gist options
  • Save devlights/8fdf72a574895129b787 to your computer and use it in GitHub Desktop.
Save devlights/8fdf72a574895129b787 to your computer and use it in GitHub Desktop.
EntityFramework 6で、クエリ実行時にdbo.__MigrationHistoryは無効というメッセージをとりあえず消す

以下をDbContextクラスに追加

    static Model1()
    {
      Database.SetInitializer<Model1>(null);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment