Entity Framework and Deleting a Child Record

Oct 12, 2009 at 11:52 PM

I set up a data grid to edit the children of a parent i.e.:

<tk:DataGrid ItemsSource="{Binding Parent.Children}"  CanUserDeleteRows="True">

I'm using ADO.NET Entity Framework to an SQL Lite database.

When I delete a record and then go Entity.SaveChanges() I get::

A relationship is being added or deleted from an AssociationSet 'FK_Children_0'. With cardinality constraints, a corresponding 'Children' must also be added or deleted.

Which makes me suspect the the datagrid is deleting the Parent record insead of the Child record.  Or am I missing something?