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:
parent
4c41863e47
commit
e48c5e2075
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,6 @@ public class DapperFeature : FeatureBase
|
|||
/// <inheritdoc />
|
||||
public override void Apply()
|
||||
{
|
||||
Services.AddScoped(DbConnectionProvider);
|
||||
Services.AddSingleton(DbConnectionProvider);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue