using Dapper.SqlMapper.GridReader in reading a sql sp resultset

dapper sql-server-2008

Question

*i have a class with classA which has a list of classB as property*

public class ClassA
{
public string prop1;
public string prop2;
public list<ClassB> Prop3;
}

and have another class ClassB

public class ClassB
{
public string prop4;
public string prop5;
}

i have a storedprocedure which wud execute and return 2 result set.and i want to map one result set with classA and another resultset with classB in ClassA.

now iam using Dapper.SqlMapper.GridReader to read the list of this class and map it my class.

how can i use Dapper.SqlMapper.GridReader to read the resultset and map

Accepted Answer

Take a look at Dapper's QueryMultiple. It looks like this question also covers your issue.




Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why