I need to run a program that fetches info from a REST API every 10 seconds and then posts it to an Action in my MVC 5 Web App.
So far, the best solution I've come up with is to run the Web App and then, parallel to it, a Console Application that works as this middleware, fetching the API and Posting to the Action on the Web App.
I figured a better solution would be to execute the code that powers the Console App directly inside the MVC 5 App, this way only the Web App would be executed, and the code could work on the background, fetching and posting the data.
I noticed that when you create a new project, and select Console Application, you can add it to an existing Solution. Would this enable the behavior described above?
How can I achive this behavior on the ASP.NET MVC 5 framework?