Currently, all repository operations perform individual DB connection setup and teardown in a non-atomic and thus not fail-safe way. Figure out how to best handle such external resources, abstract the pattern and reuse it throughout all DB access code.
A markdown documentation is available that explains how DB access works.
All DB access uses the above pattern. If possible, common behavior is factored into helper functions.
Currently, all repository operations perform individual DB connection setup and teardown in a non-atomic and thus not fail-safe way. Figure out how to best handle such external resources, abstract the pattern and reuse it throughout all DB access code.