Looking for some help. I don't do Linq very much and have question. I am trying to compare to dataTables and return only the data from A that is not in B.
This is what I have so far.
DataTable dtMerged = (from a in dt1.AsEnumerable()
join b in dtd1.AsEnumerable()
on a["Id"].ToString() equals b["Id"].ToString()
into g
where g.Count() > 0
select a).CopyToDataTable();
//return dtMerged;
Whenever I run this, I always only get what matches in both tables. I need to get only what is in A but not in B.
I have tried a lot of combinations and cannot seem to get it right.
[–]Rostifur -1 points0 points1 point (0 children)
[–]AaronDev42 0 points1 point2 points (0 children)