Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
300
Entity Framework 4.0 and EndEdit Error
posted

I am using the WCF Ria Services (DomainServices) with the Entity Framework to model my entities and present them through an MVVM with an ObservableCollection.

When the user add's a new record into the grid, I call Context.Add(entity) and Context.SubmitChanges() methods during the ObserableCollection.CollectionChanged event.

At the point of submitting changes I get the following error:

Entity 'Foo : 0' is currently being edited and has uncommitted changes. A call to BeginEdit must be followed by a call to EndEdit or CancelEdit before changes can be submitted.

Any idea why when the user tabs off the record and this collection event fires, it would throw this exception?

Thanks

 

Parents
No Data
Reply Children
No Data