Is there a way to configure my Azure Cloud storage in `ConfigureServices` of the `Startup` class, the same way I configure my DatabaseContext?

```
var connection = Configuration.GetConnectionString("myDatabaseConnectionString");
services.AddDbContext<DatabaseContext>
         (options => options.UseSqlServer(connection));

```

I know I could access the connection string from within a controller by adding the IConfiguration instance to the service collection as a singleton object in ConfigureServices and then inject IConfiguration in the controller.

But how do I access this in the following class or is this a bad practice and there is a better way (e.g. in the services.Add ...) ?

```
public class ClassifiedsToProcess
{
    public static void AddMessage(string message)
    {
         var storageConnectionString = Configuration.Get("AppSettings:ConnectionString");
         storageAccount = CloudStorageAccount.Parse(storageConnectionString);
         ...
    }
}

```

Thanks !