Compare and write data from database file using LINQ

Hi All,

I have DATABASE and download as csv file with 1 lakh of datas
And one input file i received.

From that input file for every row i need to compare in database if ID is matched means i extract the data from data base
i attached the sample screenshot below can you please give me logic and correct LINQ query to execute the process.

qNote If ID matches then only need to extract data fro database other wise leave it


Hi @Vicky_K

Can you try with this LINQ expression

DT_Final = DT_2.AsEnumerable.Where(Function(r) not DT_1.AsEnumerable.Any(Function(r2) r2("ID").ToString=r("ID").ToString)).CopyToDataTable.DefaultView.ToTable(False,{"ID","Name","Status","Age})