Entity Framework 4.3. Invalid column name 'CreatedOn'

前端 未结 4 2016
盖世英雄少女心
盖世英雄少女心 2020-12-17 10:31

I\'m developing an ASP.NET MVC 4 application using VS 2010 and EF 4.3. It retrieves some data from an external database and all worked as expected until I tried to recompile

4条回答
  •  春和景丽
    2020-12-17 11:12

    EF 4.3.1 added a CreatedOn column to the __MigrationHistory table, which EF 5.0 subsequently removed. I suspect you have upgraded EF to 4.3.1 since you last updated the database.

    You could either run a Migration to add the CreatedOn column, manually add it yourself, or upgrade to EF 5.0 where it is no longer necessary.

提交回复
热议问题