I have an asp.net website that stores events inside a database table. Then I have a windows service app that reads those events and performs appropriate actions. Currently its possible for the two processes to insert and remove records from the same table at the same time.
What is a better pattern for developing such a system so to insure the two are never working on the same table simultaneously?
I’m not sure about pattern but I’d do a WCF-service and let both use that to access the data. Then share a common lock object between all methods that alter (or read) the table contents.