when changing an entity key from DatabaseGeneratedOption.None to DatabaseGeneratedOption.Identity the following migration code block will throw an exception:
Code: Select all
DropPrimaryKey("dbo.TestTables");
AlterColumn("dbo.TestTables", "TestTableID", c => c.Int(nullable: false, identity: true));
AddPrimaryKey("dbo.TestTables", "TestTableID");