How to remove all rows from dt1 where dt1.user is found at dt2.username. Schema is different between datables
We can reformulate as: Get all dt1 rows where dt1.user not is present in dt2.username
Assign Activity
Result | List(Of DataRow) =
(From d1 In dt1.AsEnumerable
Where Not dt2.AsEnumerable.Any(Function (d2) d2("username").toString.Trim.Equals(d1("user").toString.Trim))
Select r=d1).toList
then based on the filter result we can copy it to a datatable or clone the origin one
check within an if acitvity
Result.Count > 0
Then: dtResult = Result.CopyToDataTable
Else: dtResult = dt1.Clone