使用此代碼,我的數據庫沒有變化。 當上面的代碼運行時,不再有新的條目創建,也不是更新的條目。更新SubmitChanges() - 不更新
public void UpdateCallback(callback cb_)
{
callback call = context.callbacks.Single(c => c.callbackID == cb_.callbackID);
//call.callbackID = cb_.callbackID;
call.status = cb_.status;
call.contactName = cb_.contactName;
call.company = cb_.company;
call.phone = cb_.phone;
call.calledDate = cb_.calledDate;
call.callback1 = cb_.callback1;
call.notes = cb_.notes;
try
{
context.SubmitChanges();
}
catch (Exception e)
{
Console.WriteLine(e);
}
}
我有這個問題,以及原因。 – Blorgbeard 2009-04-24 07:26:31