How to alter column to identity using entity framework dbmigration?
问题 I reverse engineered a small database using Entity Framework 5.0 and the power tools. Then I started developing a website. I hit a problem because I had forgotten to make the ID column on one of my tables an IDENTITY column. So I added a code first migration and ran it using the update-database command in the package manager console. Here is the "Up" method I wrote: public override void Up() { Sql("DELETE FROM dbo.Sections"); Sql("DELETE FROM dbo.QuestionInstances"); DropForeignKey("dbo