I have a SQL table :
Id FirstName LastName DateTime
1 John Doe 2016-09-27 20:45:52.293
2 John Doe 2016-09-27 20:45:53.620
3 John Doe 2016-09-27 20:46:02.370
4 John Doe 2016-09-27 20:46:02.533
5 John Doe 2016-09-27 20:46:02.680
6 John Doe 2016-09-27 20:46:02.820
And one List<Int>
:
List<int> ids = new List<int>(){ 2, 3, 5 }
I use Linq To Sql class for get all record in my sql table. I do :
using(DataClassesDataContext Context = new DataClassesDataContext())
{
var Customers = Context.Customers;
}
I want to know if all the ids on the list are present in the table and if not, find out what line is not present
What is the best way to do this ?