I have a .NET 4 web application that has three separate projects - DAL, BAL, and UI. I am using Entity Framework to interact with the database.
I have code that cycles through a collection of database data, calls methods depending on what it finds, and then updates the database. I want this code to work all the time. At the same time, I want users to be able to register and run reports, etc., while the code is constantly running in the background.
What is a good approach to this? Create a service for constantly running code, a separate thread, a completely separate project for code that works constantly, or another approach.?
Also, depending on the answers, how would I start to run code that works all the time? those. only through the form upload method or is there a better approach? I am currently running the code by clicking the "Start" button; This is great for testing, but is not going to work during the production process.
source share