public override void ConfigureServices(WebHostBuilderContext context, IServiceCollection services)
        {
            // Bind the connection options based on the current configuration.
            DatabaseConnectionOptions options = new DatabaseConnectionOptions();

            context.Configuration
            .GetSection(DatabaseConnectionOptions.ConfigurationSection)
            .Bind(options);

            // Build the database service from the connection options.
            DatabaseService database = new DatabaseService(options);

            // Add the database service to the service collection.
            services.AddSingleton(database);
        }
 public DatabaseService(DatabaseConnectionOptions options) =>
 (Instance, Database) = (options.Instance, options.Database);