저장 프로 시저를 실행할 때 LINQ To SQL DataContext에서 출력 매개 변수를 다시 가져올 수 있습니까?LINQ 저장 프로 시저의 출력 매개 변수를 SQL ExecuteQuery로 캡처
IEnumerable<Address> result =
ExecuteQuery<Address>(((MethodInfo)(MethodInfo.GetCurrentMethod())),
address, pageIndex, pageSize, totalCount);
address
,
pageIndex
및
pageSize
입력 파라미터이다
및 TotalCount
는 출력 파라미터이다.
어떻게 출력 매개 변수를 캡처 할 수 있습니까?
[Function(Name = "Telecom.AddressSearch")]
private IEnumerable SearchAddress([Parameter(Name = "address", DbType = "varchar")] string address,
[Parameter(Name = "pageIndex", DbType = "int")] int pageIndex,
[Parameter(Name = "pageSize", DbType = "int")] int pageSize,
[Parameter(Name = "totalCount", DbType = "int")] ref int totalCount)
{
IEnumerable result = ExecuteQuery(((MethodInfo)(MethodInfo.GetCurrentMethod())), address, pageIndex, pageSize, totalCount);
return result;
}
, 그러나 그것은 PARAMS [] 객체가 다른 가능한 해결책을 찾을 유효하지 않은 매개 변수 – BBurke
, 내 업데이트 된 대답을 확인했다고 말했습니다 : 귀하의 경우에는이 같은 작업을해야합니다. – sgriffinusa
그래, 내가 그걸 보았다.하지만 나는 그것이 작동 할 것이라고 생각하지 않았다. IexecuteResult가 Enumerable 데이터를 반환하는 방법을 보지 않았습니다. – BBurke