The Back-End OrderProcessor Service

Now that the data classes have abstracted away the heavy lifting, the OrderProcessor has only one task remaining: to scan the Excel file and invoke the methods needed to add the order and order item records.

The OrderProcessor is created as a Windows service that runs uninterrupted on any computer (including a server or the sales manager’s workstation). For most of its life, it remains quietly idle. When a new Excel file appears in the designated directory, however, it springs into action, transferring the information into the database and moving the file to a new directory. To automate this task, the OrderProcessor uses the FileSystemWatcher class from the System.IO namespace. This class has a single purpose ...

Get Microsoft® .NET Distributed Applications: Integrating XML Web Services and .NET Remoting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.