您的位置:首页 > 编程语言 > PHP开发

BLToolkit Output Parameter in DataAccessor

2015-08-26 16:12 615 查看
How to map output parameter in SQL to an out parameter in DataAccessor? I've tried to put Direction.Output attribute, but with no luck. Nonworking sample:
public abstract class DocumentAccessor : DataAccessor<DocumentRecord>
{
[SprocName("[dbo].[FE_GetDocuments]")]
public abstract IEnumerable<DocumentRecord> GetDocuments(
[ParamName("PageIndex")] int pageIndex,
[ParamName("PageSize")] int pageSize,
[ParamName("SortColumn")] string sortColumn,
[ParamName("SortDirection")] string sortDirection,
[ParamName("TotalCount"), Direction.Output] out int totalCount);
}



2 Answers

answered 2011-08-25 13:05:50#1

Might help

Bltoolkit DataAccess UnitTests
on Output Params

Bltoolkit Direction documentation

answered 2011-08-25 14:32:48#2

Resolved by changing result type to 
IList<DocumentRecord>
. Looks like BLToolkit generates deferred-execution proxy for 
IEnumerable<T>
 signature.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: