title: Linq to SQL Delete child and its relationships while Deleting Parent
body: <p>The relationships in my case 
  Photo -PhotoId
  PhotoGroupsMap - MapingId(PK), PhotoId(FK with Photo)
  PhotoShare - ShareId(PK),PhotoId(FK with Photo)
  PhotoGroupComment - MapingId (FK with PhotoGroupsMap)</p>
  
  <p>And i am using LinqSql for deletion and i want to Delete a Photo Object and i used the code </p>
  
  <pre><code>  Photoset _item = (from item in dbContext.Photos
                                where ....
                                select item).SingleOrDefault();
  
              //remove all Photo Share Entries
              dbContext.PhotosetShareMaps.DeleteAllOnSubmit(_item.PhotoShareMaps);
             //remove all Photo Group entries
              dbContext.PhotoGroups.DeleteAllOnSubmit(_item.PhotoGroups);
  </code></pre>
  
  <p>But how can i delete all Comments Associated with Groups? Since in this case if am trying to Delet Some Photo which is in some groups and the group contains some comment row , i am getting error (Since i am not removeing comments ). How can i remove that ?</p>