If you look at the logfiles you'll see that DbDataStore opens and closes its IDbConnection a lot. Won't this lead to performance problems?
Well, not really, as Jim explained:
Most sensible data providers (ie the ADO.Net libraries for 3rd party databases) will automatically pool connections for you. This means that closing a connection does not necessarily close it (instead, it remains open and is released to the pool), and opening a connection does not necessarily open a new one (it merely retrieves an existing open connection from the pool). Attempting to subvert this mechanism will most likely hurt performance, not help it.
For the Firebird data store there is a good reason to allow this as Johannes explained:
The FirbirdDataStore already supports this feature. It has an constructor where you can pass in an existing connection and tell via a boolean flag that the connection shouldn't be closed automatically by NEO. This makes f.e. a lot of sense for Firebird embedded desktop applications where you can have just one open connection (embedded provider) and sometimes probably needs to access the database not just via NEO. For desktop application it's often very important that the file (the database) locked when opened in the application (so that f.e. no other application instance can open the same database). Without this feature this would not be possible.
