How to hook up SqlDataAdapter to profile db operations with mvc mini profiler

后端 未结 1 1297
梦毁少年i
梦毁少年i 2020-12-21 01:41

I looked up How could I instantiate a Profiled DataAdapter to use with MVC MINI PROFILER? but this also did not answer my question.

I have some code like this in Sq

相关标签:
1条回答
  • 2020-12-21 02:29

    There's a class ProfiledDbDataAdapter provided for this that you can use wrapped around your existing SqlDataAdapter.

    When I tried using it I found I needed to use the Fill(DataSet) method instead of Fill(DataTable) else I always received an error "The SelectCommand property has not been initialized before calling 'Fill'." despite setting both adapter's SelectCommand properties.

    0 讨论(0)
提交回复
热议问题