I am planning to use WCF (not ria) in conjunction with Entity Framework 4 and STE (Self tracking entitites). If I understand this correctly my WCF should return an entity or collection of entities (using LIST for example and not IQueryable) to the client (in my case Silverlight).

The client then can change the entity or update it. At this point I believe it is self tracking? This is where I sort of get a bit confused as there are a lot of reported problems with STEs not tracking.

Anyway, then to update I just need to send back the entity to my WCF service on another method to do the update. I should be creating a new OBJECTCONTEXT every time? In every method?

If I am creating a new objectcontext every time in every method on my WCF then don't I need to re-attach the STE to the objectcontext?

So basically this alone wouldn't work??

```
using(var ctx = new MyContext())
{
    ctx.Orders.ApplyChanges(order);
    ctx.SaveChanges();
}

```

Or should I be creating the object context once in the constructor of the WCF service so that 1 call and every additional call using the same WCF instance uses the same objectcontext?

I could create and destroy the WCF service in each method call from the client - hence creating in effect a new objectcontext each time.

I understand that it isn't a good idea to keep the objectcontext alive for very long.