Updating a value in Linq to SQL IEnumerable

Using Linq to SQL:

if(!parentlist.childlist.Contains(row1))
      parentlist.childlist.Add(row1);
else

      

How can I update a row of a child list from row1? Each line of the child list has a unique identifier.

parentlist

implements IEnumerable

and childlist

is IList

.

+1


source to share


1 answer


I don't think you can do it. You need to select the chidlist item from datacontaxt and then add a string to it and send back.



This is not satisfying, but I think this is just one of the annoying limitations of linq2sql.

0


source







All Articles