1
0
mirror of https://github.com/bitwarden/server synced 2026-02-20 19:33:32 +00:00

Initial PoC of seeder API

This commit is contained in:
Hinton
2025-10-07 12:20:32 -07:00
parent 8f41379548
commit fa46919409
10 changed files with 266 additions and 13 deletions

View File

@@ -86,12 +86,12 @@ namespace Bit.SharedWeb.Utilities;
public static class ServiceCollectionExtensions
{
public static SupportedDatabaseProviders AddDatabaseRepositories(this IServiceCollection services, GlobalSettings globalSettings)
public static SupportedDatabaseProviders AddDatabaseRepositories(this IServiceCollection services, GlobalSettings globalSettings, bool forceEf = false)
{
var (provider, connectionString) = GetDatabaseProvider(globalSettings);
services.SetupEntityFramework(connectionString, provider);
if (provider != SupportedDatabaseProviders.SqlServer)
if (provider != SupportedDatabaseProviders.SqlServer && !forceEf)
{
services.AddPasswordManagerEFRepositories(globalSettings.SelfHosted);
}