Skip to content

InvalidOperationException due to open connection when testing #1

Description

@manfredk

Hi Tim,
I've tried DapperUnitOfWork and all is well so far. But when testing I encountered an InvalidOperationException due to the connection not being closed. I fixed that with a change in the UnitOfWork.ctor on line 24 of UnitOfWork.cs:

/*24*/          //_connection.Open();
/*25*/          if (_connection.State == ConnectionState.Closed) _connection.Open();   // new

Kind regards,
Manfred

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions