You can execute multiple queries in a single SQL statement using the QueryMultiple method. Once executed, you can map the returned results to multiple objects using methods such as Read, ReadFirst, ReadSingle and more.
QueryMultiple method allows you to select multiple results from a database query. That feature is very useful for selecting multiple results sets at once, thus avoiding unnecessary round trips to the database server.
Chapters (Timestamp)
00:00 - Intro
00:05 - Understanding what is multiple result sets
01:14 - Explaining demo setup
01:53 - Using dapper method (QueryMultiple) to fetch multiple result sets in a GridReader
02:53 - Read methods to get data from GridReader (Read, ReadFirst, ReadSingle, ReadFirstOrDefault, ReadSingleOrDefault)
04:18 - Printing fetched data on console window
04:52 - Why sequence in which we are retrieving data from GridReader is important?
06:10 - Outro