我正在使用Entity Framework 5到Microsoft azure服务器。 我有一张包含数百万条记录的表格。我需要添加两列并将其更新为给定值。我编写的代码如下:
public override void Up()
{
AddColumn("dbo.MST_FarmerProfile", "Season", c => c.String(maxLength: 500));
AddColumn("dbo.MST_FarmerProfile", "Year", c => c.Int());
Sql("Update MST_FarmerProfile Set Season='Kharif' where Season is NULL");
Sql("Update MST_FarmerProfile Set Year=2013 where Year is NULL");
}
public override void Down()
{
DropColumn("dbo.MST_FarmerProfile", "Year");
DropColumn("dbo.MST_FarmerProfile", "Season");
}
在Azure服务器中部署之后,我不断地“等待操作超时”'例外,没有任何工作。