How to access database context outside of razor page?

I built a small web-app for college last semester and ran into an issue that I wasn’t able to properly solve. The app is a price tracker that’s using Selenium or curl to scrape products from webpages and track their price over time.
My issue is, how do I properly access the database context outside of the .cshtml.cs files? My current solution to this was to have a global variable that is assigned to the database context from the Main() class as such:

How to upload a file directly to azure blob from the URL in c#?

I have a url which looks like following “https://XXXXXXXX-functions.azurewebsites.net/api/UploadedZIPFile?ticket=1234&code=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX” which contains the file. “UploadedZIPFile” is the file Name. In URL I don’t have the extension of filename. After downloading the file into my system it is showing the extension. I want to upload the file which came from the URL into Azure blob storage. How can I upload the file to azure blob storage from the given URL using c#? Please Added my code sample below