I am in the midst of re-writing a very old VB legacy application into a browser based C# ASP.Net application using Core 2.1 and Entity Framework back-ended to SQL server.
Several of the functions are long-running tasks. One example is an import of an address gazetteer CSV file. The files are typically 50-100Mb in size and need parsing. I have written an uploader and import function, which runs in around 15 minutes - most of that is database write-time.
I am trying to find a way to run the import process so that it can report back progress to the client browser, ideally by changing the menu option to a progress bar until the task is done - since the _layout.cshtml is on every page, it would let any user know the task is running and when it will finish.
I've looked at IHostedServices and the BackgroundService functions, but I cannot find any examples that match what I'm trying to do. I've seen an article around MVC5 that used SignalR & Knockout (which I'm less familiar with) but it doesn't use the Core 2+ or the newer service functions.
Can anyone point me to a good .Net Core > 2.0 example of something like this?
Thanks in advance.