Q:
I have two queries each one return a DataTable. I wanna to return another DaTaTable as a result of(What exist in the first DataTable AND Not Exist(NOT IN) the second DataTable).
My queries:
EDIT : I make it general:
1-DT1:
DataTable dt1 = cc1assiscrsevalDAL.GetAll(int.Parse(Session["course_prof"].ToString()), 0);
2-DT2:
DataTable dt2 = cc1assiscrsevalDAL.GetConfirmedEval(int.Parse(Session["course_prof"].ToString()));
Note:batch_no,crsnum,lect_code are the composite primary key
What is the best way to do that?(wise performance).
I wanna also to do that with LINQ.(if possible).
There is an extension method in the linq called Except which solves your problem but we need to create a separate class for that which i have done in the above code.