Is connection pooling working correctly in Subsonic?

后端 未结 4 1448
粉色の甜心
粉色の甜心 2021-01-23 20:52

I am getting reports that connection pooling is not working in the Subsonic orm when used with sql server on a remote machine. I\'m not sure how they are monitoring this, maybe

4条回答
  •  旧时难觅i
    2021-01-23 21:19

    This is something i only recently discovered myself after having similar issues.

    As Rob said it should not be used like this:

    MyTableCollection objCol = new MyTableCollection().Load();
    

    it should be used like:

    MyTableCollection objCol = new MyTableCollection();
    objCol.LoadAndCloseReader(MyTable.FetchAll());
    

提交回复
热议问题