Open UniSnake opened 4 years ago
No exception.
System.InvalidOperationException: 'ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.'
Pass true to SqlServerProvider constructor for example: services.AddSingleton<IProvider>(new SqlServerProvider(connectionString, false, "Actors"));
true
services.AddSingleton<IProvider>(new SqlServerProvider(connectionString, false, "Actors"));
Add line connection.Open() to SqlServerProvider.ExecuteNonQuery(string).
connection.Open()
SqlServerProvider.ExecuteNonQuery(string)
Ah, I see there is already a PR for this (https://github.com/AsynkronIT/protoactor-dotnet-contrib/pull/4)
Expected Behavior
No exception.
Actual Behavior
System.InvalidOperationException: 'ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.'
Steps to Reproduce the Problem
Pass
true
to SqlServerProvider constructor for example:services.AddSingleton<IProvider>(new SqlServerProvider(connectionString, false, "Actors"));
Specifications
StackTrace
Recommendation
Add line
connection.Open()
toSqlServerProvider.ExecuteNonQuery(string)
.