Compare CSV files using LINQ to check for modified rows

Oct 8, 2012 at 2:05 PM

 Hi

I am working on a .NET 4.0 desktop application. Application reads the CSV files daily and update the values in the Database.

Every row in the CSV file has an unique user Id. The details of every user may or may not change daily.

Application has to read the CSV and check if any of the values in the file has changed. Or if any new users with new user Ids are added to the CSV.

We have a local mater CSV which would be in Sync with the database. When Database is updated this master CSV will also be updated.

How to compare the incoming CSV with the local master CSV to check if any of the values in the incoming files has changed?

How to filter only the modified users or new users from the incoming files?

How to use LINQ to compare the CSV files and get only the modified or newly added users?

Thanks

Ashok