ここで何が間違っていますか?
...
using (var ctx = ObjectContextManager<MyDataContext>.GetManager("MyDataContext"))
{
var idsToUpdate = "2,3";
var parameters = new[]
{
new SqlParameter("DesiredEndDate", SqlDbType.DateTime).Value = newUpperLimit,
new SqlParameter("TasksToUpdate", SqlDbType.NVarChar).Value = idsToUpdate
};
ctx.ObjectContext.ExecuteStoreCommand("UPDATE dbo.Tasks SET DesiredEndDate = @DesiredEndDate WHERE Id IN (SELECT Id FROM dbo.fn_Split(@TasksToUpdate, N','))", parameters);
ctx.ObjectContext.SaveChanges();
}
...
エラーが発生します
スカラー変数「@DesiredEndDate」を宣言する必要があります。
スカラー変数「@TasksToUpdate」を宣言する必要があります。
しかし、コードの何が問題なのかわかりません:/