Enable Dapper and update its service registration

The Dapper usage flag has been set to true in the Elsa.Server.Web program. Additionally, in the Dapper feature, the DbConnectionProvider is now registered as a singleton instead of scoped, reflecting changes in the database connection strategy.
This commit is contained in:
Sipke Schoorstra 2024-02-25 14:23:46 +01:00
parent 4c41863e47
commit e48c5e2075
2 changed files with 2 additions and 2 deletions

View file

@ -25,7 +25,7 @@ using Proto.Persistence.SqlServer;
const bool useMongoDb = false;
const bool useSqlServer = false;
const bool useDapper = false;
const bool useDapper = true;
const bool useProtoActor = false;
const bool useHangfire = false;
const bool useQuartz = true;

View file

@ -30,6 +30,6 @@ public class DapperFeature : FeatureBase
/// <inheritdoc />
public override void Apply()
{
Services.AddScoped(DbConnectionProvider);
Services.AddSingleton(DbConnectionProvider);
}
}