DataService BeginSaveChanges Results

    General discussion

  • I am using ADO.NET dataservices and I have a tblSession entity that I wish to save to. I create a new tblSession object and call begin save changes. Sure enough if you call the method, it works. I have a good debug environment in a windows 7 vm which via vmware workstation, i am able to access the visual studio webserver and even run it through fiddler. Win7 just because I want to see what it is like and why not!

     I see the result [single result] come back from the call in the xml response. I see the new primary key that has been generated. My question is where can I access the newly generated key?

    for example

    context2.BeginSaveChanges(t =>



    int sess = (t.AsyncState as tblSessions).sessionID;

     //this is for debugging purposes


    Would this work? If not, where do I access the returned data. Is there an event fired when the context is updated?


    Monday, June 08, 2009 4:38 AM