A Repasky

A Repasky

  • NA
  • 231
  • 183k

How do I compare a List against a DB Table using LINQ?

Mar 2 2012 5:14 PM
I am new to LINQ.  I have one year of experience with C#.

I have a List<Detail> with 3 properties: JobNumber, PieceID, & ClaimNbr

I have a DB table with the same 3 fields.  I need to compare PieceID to make sure the are the same using LINQ.  How do I get the table into a List or something so I can use it.  I tried datareader and datatable and it does not seem to be able to use them.

I know that I have to use a Join, but I cannot even start to figure out the query until I can use the DB fields.

Please help.

Thanks for your help ahead of time.

Arep

Answers (22)