0
Where 절을 함수에서받은 부울 값에 따라 적용 할 필드를 변경하려고합니다. 내가 참으로 bValueIsString 설정하면 ..LINQ where 다른 필드가있는 절
Conversion from string "someString" to type 'Integer' is not valid.
을 :
Public Function SomeFunction(ByVal value As String, Optional bValueIsString As Boolean = False) As JsonResult
...
Dim q = (From t In table
Where If(bValueIsString, t.Desc=value, t.Id=value)
Select New With {.Id,
.LongDescription,
.Desc)})
...
End Function
을하지만 계속 받기 : 지금까지 나는이 있습니다.
-
내가 ScottGu의 동적 LINQ 도서관에 대해 알고 있지만, 가능하면 차라리 외부 구성 요소를 사용하지 것이다 ..
감사합니다. :) – jplanglais