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);
}
Resolved by changing result type to IList<DocumentRecord>
. Looks like BLToolkit generates deferred-execution proxy for IEnumerable<T>
signature.