ServiceStack.OrmLite从存储过程中获取多个结果集

det*_*ale 4 servicestack ormlite-servicestack

我一直在使用SqlList()从SP接收结果集,这很方便.

var people = db.SqlList<Person>("EXEC GetRockstarsAged @age", new { "age", 42 });
Run Code Online (Sandbox Code Playgroud)

但是如何使用此OrmLite从单个SP获取多个结果集?使用上述方法似乎只检索第一个结果集.

Sgt*_*ock 5

不幸的是,除非与Dapper结合使用,否则ServiceStack.OrmLite不支持多个结果集.使用ORMLite和输出参数的ServiceStack MARS(多个活动结果集)

或者,您可以使用.Net SqlCommand. 从C#中的存储过程返回多个记录集

ServiceStack.OrmLite V4说明:https://github.com/ServiceStack/ServiceStack.OrmLite

ServiceStack.OrmLite V3备注:https://github.com/ServiceStack/ServiceStack.OrmLite/tree/v3