I understand the topic is not new, I read a few posts but did not come to the answer ...
Each time the connection is opened for a very long time, but the idea was to use a connection pool, is not it?
As I understand it in MySQL you cannot specify a connection pool in the connection string.
How to do the right thing not to spend a lot of time opening the database connection?
Thanks!
IDbConnectionFactory = connection = new OrmLiteConnectionFactory(TeleportParams.DbConnectionStr, MySqlDialectProvider.Instance)
...
void function1(){
var db = connection.Open();
db.Select("some request");
}
void function2(){
var db = connection.Open();
db.Select("some request");
}
...
function1();
function2();