DATABASE 1: BOOK - TABLENAME1: BOOKINFORMATION1 (ID,NAME)
DATABASE 2: BOOK2 TABLENAME2: BOOKINFORMATION2 (ID,NAME)
I want to select bookınformation1 id and then bookınformation2 id.I to select the ones with equal linq and I would like to add equal values to the other table(other table name:bookınformation3).I take error this code.How to solve this problem.
var query1 = datatable1.AsEnumerable().Select(a => aID.ToString() });
var query2 = datatable2.AsEnumerable().Select(b => bID.ToString() });
var exceptAB = query1.Except(query2);
DataTable dtMisMatch = (from a in datatable1.AsEnumerable()
join ab in exceptAB on a.ID.ToString() equals
ab.ID
select a).CopyToDataTable();