I would like to know if there is a way to create just one connection to the database to perform the tasks. With each Action executed, a connection is created with the Database and at the end of the Action execution, the connection is closed. So, when it is necessary to execute an Action inside another two connections are left besides the one that was opened for first consultation to the database, thus creating several clones of connection.
I wonder if there is a function that solves this and how to use it. If you need some code to give a better understanding about what I need I put here.