I need to be able to tell when a query multiple async in dapper returns back a blank data set (so no rows are returned), but I am not sure of the correct way of doing this.
The following is similar to my current code:
var data= await db.QueryMultipleAsync(getDataProcedure, commandType: CommandType.StoredProcedure, param: parameters);
var table1Data = data.Read<table1Type>().First();
var table2Data = data.Read<table2Type>().First();
What I want to be able to do is to place an if around the table1Data
and table2Data
variables such that they are only ever populated if there is data to populate them.
Please let me know if I need to explain any further.