Entity Framework 5 expects CreatedOn column from MigrationHistory table

前端 未结 5 1367
故里飘歌
故里飘歌 2021-01-03 23:41

I am migrating an MVC 3 application from EF 4.3 to EF 5. I noticed that EF 5 expects a CreatedOn column in the __MigrationHistory table, which does

5条回答
  •  旧时难觅i
    2021-01-04 00:00

    Just like Filip Cornelissen said, it is a thing between MiniProfiler.EF and Entity Framework 5.0.

    Solving/hiding the problem is actually easier than you would think. It is only a "debugging problem" as the error you'll get is only happening during the instantiating period (checking for new migrations), and the error is an "SQL Unhandeld Exception".

    So, solving this problem is easy:

    Go in Visual Studio to your "DEBUG" tab. Hit the "Exceptions" item. In the new dialog, you open the tree "Common Language Runtime Exceptions". Under "System.Data.SqlClient, uncheck both checkboxes after "System.Data.SqlClient.SqlException". Add it, if it ain't there.

    And off ya go!

提交回复
热议问题