views:

226

answers:

1

I have a Silverlight application that I use the Beta2 T4 Self tracking entities for. Inserting and updating records seems to be working but I haven't been able to remove items.

My primary entity is called Contract. It has a navigation property to a collection of Contract2Service entities. When I retrieve a Contract object I can do this:

Contract2Service rem = myContract.Contract2Service.First();
myContract.Contract2Service.Add( new Contract2Service() { ServiceID= 5 });
myContract.Contract2Service.Remove(rem);

And when I apply the changes in my WCF service I'll get the new Contract2Service added but the one I want to remove is not deleted.

Here's how the save is done in WCF:

using (var ctx = new AspenNet_VContractEntities())
{
            ctx.Contracts.ApplyChanges(contract);
            return ctx.SaveChanges() > 0; 
}

Any ideas what might cause this?

A: 

Seems to be fixed in the RC.