Dim placesOfServces = From x In tbl_pos _
Where x.active = True _
Select x.pos_id, x.pos_code & " - " & x.pos_desc
获取错误
范围变量名称只能从没有参数的简单或限定名称推断。
问题,需要返回x.pos_code
和x.pos_desc
的串联字符串。帮助必须在VB.NET中。
答案 0 :(得分:2)
Dim placesOfServces = From x In tbl_pos _
Where x.active = True _
Select New With {.Pos_id= x.pos_id , .CodeDesc = x.pos_code & " - " & x.pos_desc}
答案 1 :(得分:1)
试试这样:
Dim placesOfServces = From x In tbl_pos _
Where x.active = True _
Let cc = x.pos_code & " - " & x.pos_desc
Select x.pos_id, cc