Select Distinct in LINQ
-
In SQL its fairly easy to get a set of rows from several Tables which are unique based on the value of one column. I am wanting to do this on a DataSet using LINQ eg: Select from a Imported Datatable all the rows, which have a "Name" in the Name column, which are not currently in the Name column of the existing Persons DataTable. i have had a look at a few things and the select distinct is no problem, its the LINQ equivalent of the SQL " WHERE NOT IN" that i am having difficulty understanding. Any guidance would be greatly appreciated:confused: Thanks Folks in advance
-
In SQL its fairly easy to get a set of rows from several Tables which are unique based on the value of one column. I am wanting to do this on a DataSet using LINQ eg: Select from a Imported Datatable all the rows, which have a "Name" in the Name column, which are not currently in the Name column of the existing Persons DataTable. i have had a look at a few things and the select distinct is no problem, its the LINQ equivalent of the SQL " WHERE NOT IN" that i am having difficulty understanding. Any guidance would be greatly appreciated:confused: Thanks Folks in advance
Take a look at the Except operator.
Deja View - the feeling that you've seen this post before.