In Dapper, the buffered parameter on the Read and ReadAsync methods indicates whether the data should be buffered (loaded into memory at once) or unbuffered (streamed one row at a time). By default, this parameter is true, meaning data is buffered. If set to false, data is read row by row, which can reduce memory usage for large result sets.
string sql = "SELECT * FROM Customer; SELECT * FROM Order";
using (var connection = new SqlConnection(connectionString))
{
using (var multi = connection.QueryMultiple(sql))
{
var customers = multi.Read(buffered: false);
var orders = multi.Read(buffered: false);
}
}