ASP.NET Core MVC - Startup code to run
Greetings!
I'm building a website using ASP.NET Core MVC, and I'll need access to a google API (Gmail). In accessing a Google API, you need to use a service object through which you make requests. This object need only be created once for the life of the application.
What I need to do, is to create this object as soon as I start the application (once the server has been configured and is ready to serve).
So I'd like to know if there is a file/method at which any startup code can be placed. The Startup.cs file itself seems more for configuring than for what I need, and the main method starts the server so that doesn't look right.
Please help? First time using anything .NET.
Thanks ;)
0 comments:
Post a Comment