Hi, I`m using hangfire (hangfire.io) as a middleware to schedule some jobs in Radzen apps. Tasks can be launched (fire and forget) to, for example, process an uploaded file or in a recurrent way in certain time period to check an email inbox or another resource. The tasks are coded in methods of a static class and can be launched from Startup.Custom.cs and/or a Custom Server Method. I'm used both with success. My question is about database context. I want to use entity framework access to read and write from my hangfire static class and I'm trying to instance a db context but it require an HttpAccessor, I don't have it in my static class because hangfire methods will be triggered by a worker process independent of UI. How I could have a working instance of db context without the HttpAccesor?
Trying to add it but is a method not available. Link is about asp.net core 2.2 and when this radzen app was created I used .NET Core 2.0. Must I recreate server side code?
Well that explains it - HttpContextAccessor was added after 2.0. You better recreate the server-side code - try changing the "version" setting in the app.json file to 2.2. You will have to install .NET Core 2.2 as well.