最佳答案
I'm new to LINQ and want to know how to execute multiple where clause. This is what I want to achieve: return records by filtering out certain user names. I tried the code below but not working as expected.
DataTable tempData = (DataTable)grdUsageRecords.DataSource;
var query = from r in tempData.AsEnumerable()
where ((r.Field<string>("UserName") != "XXXX") || (r.Field<string>("UserName") != "XXXX"))
select r;
DataTable newDT = query.CopyToDataTable();
Thanks for the help in advance!!!