Return value types from DbConnectionFactory methods
I'm just wondering why the return value from the CreatePersistent overloads on Effort.DbConnectionFactory is DbConnection while the return value from CreateTransient is EffortConnection. I can see that (at least in my case) the return value from CreatePersistent is also an EffortConnection, so downcasting manually is possible, but why aren't the return types the same? Is the object returned from CreatePersistent sometimes not an EffortConnection?
Hello @magnusbakken ,
CreateTransient was originally returning a DbConnection but we modified it to EffortConnection since we added a few options on it.
I don't think there is any reason why CreatePersistent doesn't return yet an EffortConnection besides that we missed to do it when we have done the CreateTransient.
We will look at it.
Best Regards,
Jonathan
Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework Extensions • Entity Framework Classic • Bulk Operations • Dapper Plus
Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval Function • SQL Eval Function
Hello @magnusbakken ,
The v2.2.5 has been released
The CreatePersistent method now also return an EffortConnection.
Let me know if everything now works as expected.
Best Regards,
Jon