public static IServiceCollection RegisterReadDependencies(this IServiceCollection services) { services.AddScoped <IDbConnection, SqliteConnection>(provider => new SqliteConnection(provider.GetConnectionString("Read"))); DomainConfiguration.AddValidatorsFromAssembly(services, typeof(ListsQueries).Assembly); return(services); }