linq - NPoco query with Npgsql - Reset() called on connector with state Executing -
in our web application, have configured simpleinjector di container injects instance of npoco database singleton.
when running web app in multi user environment, exception when executing npoco query in code such
_db.query<tobject>().where(filterexpression).tolist()
the exception is:
system.invalidoperationexception: reset() called on connector state executing\r\n в npgsql.npgsqlconnector.reset()\r\n @ npgsql.connectorpool.release(npgsqlconnector connector)\r\n @ npgsql.npgsqlconnection.reallyclose(boolean wasbroken)\r\n @ npgsql.npgsqlconnection.close()\r\n в npoco.database.closesharedconnection()\r\n @ npoco.database.<queryimp>d__156`1.system.idisposable.dispose()\r\n @ npoco.database.<queryimp>d__156`1.movenext()\r\n @ system.collections.generic.list`1..ctor(ienumerable`1 collection)\r\n @ system.linq.enumerable.tolist[tsource](ienumerable`1 source)\r\n @ npoco.linq.queryprovider`1.tolist()\r\n
apparently npoco trying close shared connection while still in use.
any suggestions how issue can fixed?
Comments
Post a Comment