With this code there is no change in my database. when the above code is run there is no longer a new entry created neither is an entry updated.
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); } }
This post is similar to yours.
In his case, the update did not work because the table did not have a primary key.
Have you verified that CallbackId is defined as a PK in the database?