결과 집합을 저장 프로 시저에서 반환합니다. 이것은 정수 목록을 돌려주는 하나의 임시 테이블입니다. Generic.List <int?>을 Generic.List로 변환 <int>
내가 오류를 얻을 결과를 반환하려고
는Generic.List<int?> to Generic.List<int>
이 내가 노력하고있어입니다 : 그것은 내가 기반 Method, Delegate or event is expected
말한다
using (SecurityEntities ctx = new SecurityEntities())
{
List<int> newList = ctx.spStoreSearch(storeNumber).Where(x => x != null).Select(x => x).ToList();
return test;
}
ctx.spStoreSearch(storeNumber).Where
섹션에서 내가 현재 완료되었습니다 this answer
내 오류가 저장된 프로 시저에있을 수 있습니까? 그 자체로?
.Select(x => x.Value)
또한 같은 캐스팅 할 수 있습니다 : 이 내가 Null 허용 INT 등의 값을 선택 StoredProc가 select * from @TempTable
spStoreSearch의 반환 유형은 무엇입니까? –
"메소드, 위임 또는 이벤트가 필요합니다"파일에'use System.Linq'이 있습니다. 맞습니까? – dasblinkenlight