when i use Query Multiple with Store Procedure and read results one by one then i notice that first result get read very fast but next result takes too much time to read. because of this performance we get is poor. please advise weather i am making something wrong or is there any way.
my code is as following
using (IDbConnection conn = new SqlConnection(connectionString))
{
var reader = conn.QueryMultiple("GetSalesData", new { @request = RequestValue }, commandType: CommandType.StoredProcedure);
var UnitPriceList = reader.Read<GetItemDetailsEntity>().ToList();
MC.UnitPriceList = UnitPriceList.ToList();
var QFRList = reader.Read<GetItemDetailsEntity>().ToList();
MC.QFRList = QFRList.ToList();
var DispatchList = reader.Read<GetItemDetailsEntity>().ToList();
MC.DispatchList = DispatchList.ToList();
var ProjectedDispList = reader.Read<GetItemDetailsEntity>().ToList();
MC.ProjectedDispList = ProjectedDispList.ToList();
strReturnData = ObjectSerializationService.ObjectToXML(MC);
return strReturnData;
}
when i use Query Multiple with Store Procedure and read results one by one then i notice that first result get read very fast but next result takes too much time to read. because of this performance we get is poor. please advise weather i am making something wrong or is there any way.
my code is as following
using (IDbConnection conn = new SqlConnection(connectionString))
{
var reader = conn.QueryMultiple("GetSalesData", new { @request = RequestValue }, commandType: CommandType.StoredProcedure);