Ask a questionAsk a question
 

AnswerSubmitting changes from client

  • Thursday, April 02, 2009 4:59 PMsldvl Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I've been playing with ADO.NET EF for a couple days and so far I really like it.  I have a Silverlight client that communicates with the server via WCF services.  I can retrieve my entity objects (e.g., Orders) from the server (EF/SQL Server) and manipulate them in Silverlight.   I'm also able to instantiate new Orders in Silverlight, send them up via a WCF service and persist them in SQL Server with something like
       
      ds.AddToOrder(newOrderFromClient);
      ds.SaveChanges();

    Works great!

    However, I haven't been able to figure out how to do updates.  e.g., Let's say I retrieve an existing Order from the server, change an attribute of the order in Silverlight, then send the Order object back up to commit the change.  Can't use AddToOrder.  Guess I was hoping I could do something like

    ds.UpdateOrder(changedOrderFromClient)

    Can someone provide me a pointer that demonstrates the proper way to do this?

    Many thanks.

Answers

All Replies