[
  {
    "Id": "244851",
    "ThreadId": "71756",
    "Html": "<p>I set up a data grid to edit the children of a parent i.e.:</p>\r\n<p><span style=\"color:#0000ff;font-size:x-small\"><span style=\"color:#0000ff;font-size:x-small\">&lt;</span></span><span style=\"color:#a31515;font-size:x-small\"><span style=\"color:#a31515;font-size:x-small\">tk</span></span><span style=\"color:#0000ff;font-size:x-small\"><span style=\"color:#0000ff;font-size:x-small\">:</span></span><span style=\"color:#a31515;font-size:x-small\"><span style=\"color:#a31515;font-size:x-small\">DataGrid</span></span><span style=\"color:#ff0000;font-size:x-small\"><span style=\"color:#ff0000;font-size:x-small\">&nbsp;</span></span><span style=\"color:#ff0000;font-size:x-small\"><span style=\"color:#ff0000;font-size:x-small\">ItemsSource</span></span><span style=\"color:#0000ff;font-size:x-small\"><span style=\"color:#0000ff;font-size:x-small\">=&quot;{</span></span><span style=\"color:#a31515;font-size:x-small\"><span style=\"color:#a31515;font-size:x-small\">Binding</span></span><span style=\"color:#ff0000;font-size:x-small\"><span style=\"color:#ff0000;font-size:x-small\"> Parent<span style=\"color:#0000ff;font-size:x-small\"><span style=\"color:#0000ff;font-size:x-small\">.</span></span><span style=\"color:#ff0000;font-size:x-small\"><span style=\"color:#ff0000;font-size:x-small\">Children</span></span></span></span><span style=\"color:#0000ff;font-size:x-small\"><span style=\"color:#0000ff;font-size:x-small\">}&quot;</span></span><span style=\"font-size:x-small\">&nbsp;</span><span style=\"color:#ff0000;font-size:x-small\"><span style=\"color:#ff0000;font-size:x-small\"> CanUserDeleteRows</span></span><span style=\"color:#0000ff;font-size:x-small\"><span style=\"color:#0000ff;font-size:x-small\">=&quot;True&quot;&gt;</span></span></p>\r\n<p>I'm using ADO.NET Entity Framework to an SQL Lite database.</p>\r\n<p>When I delete a record and then go&nbsp;<span style=\"font-size:x-small\">Entity.SaveChanges() I get::</span></p>\r\n<p>A relationship is being added or deleted from an AssociationSet 'FK_Children_0'. With cardinality constraints, a corresponding '<span style=\"color:#ff0000;font-size:x-small\"><span style=\"color:#ff0000;font-size:x-small\">Children</span></span>' must also be added or deleted.</p>\r\n<p>Which makes me suspect the the datagrid is deleting the Parent record insead of the Child record.&nbsp; Or am I missing something?</p>",
    "PostedDate": "2009-10-12T15:52:25.01-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]