Skip to content

Refactor ExecuteQuery #20

Description

@alkampfergit

If you look at the code of method SqlPersistenceEngine::ExecuteQuery you can notice that nor connection nor transaction gets disposed if the code is successful.

Compare ExecuteQuery with the implementation of SqlPersistenEngine::ExecuteCommand that correctly disposes everything.

This can lead to serious problem, and actually probably it did not generated error because the standard implementation of OpenTransaction returns null.

I think that all the disposable object should be wrapped in using clause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions