It is possible to stream a large SQL Server database result set using Dapper?

前端 未结 1 1729
时光取名叫无心
时光取名叫无心 2021-02-19 07:55

I have about 500K rows I need to return from my database (please don\'t ask why).

I will then need to save these results as XML (more URGH) and the ftp this file to some

1条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-19 08:28

    using Dapper's Query method, which throws the entire result set into memory

    It is a good job, then, that one of the optional parameters is a bool that lets you choose whether to buffer or not ;p

    Just add , buffer: false to your existing call to Query.

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