To make the additions useful, we have to update the FileWorker class to read and insert the records into our Tutorials database.
We need to create an instance of our LINQSQL class and then use the file that we found while polling our process folder to populate a new user record for each line in the process file. To do this we will update the <ProcessFiles> method, which is where we query the outgoing folder, send an e-mail, and then move the file to our processed folder. Example 7-6 shows the changes required for <ProcessFiles>.
Example 7-6. FileWorker updated ProcessFiles method to support the LINQSQL class implementation.
Private Sub ProcessFiles() Dim LinqSql As LINQSQL = New LINQSQL() ...