Optimizing database access using LINQ
Some quick remarks:

DemoGraphic isn't a compound word so there shouldn't be a capital letter in the middle. However, Barcaccount is so it should be called BarcAccount. Same for Sridentifier, Updatedate, Aridentifier.

Use meaningful variable names. I have no idea what ar is, or sr.

UpdateEmailTable(IEnumerable&lt;StudentEmail&gt; students) and then var studentEmails = students.ToList(); Use properly named and typed parameters. Your method requires a List&lt;StudentEmail&gt; studentEmails (or perhaps ICollection&lt;StudentEmail&gt; studentEmails), write it like that and make the calling code to pass the correct argument.

This method is peppered with Console.WriteLine. This means it mixes business logic and UI. Bad idea. At least change this to use a logging system, and then configure that so it outputs to the command line.



You say this takes three hours, which suggests either a massive volume of data or particularly slow code (or perhaps your tables are not correctly indexed?). Perhaps implementing logic that uses SqlBulkInsert could solve the performance issue. Perhaps take the incoming data and store it in a table, and then apply one or two SQL queries to update the data in BarcDemoGraphicEmail.