开发者

VB.NET :For each loops with Resultset from LINQ 2 SQL

开发者 https://www.devze.com 2023-01-04 01:04 出处:网络
The below code will fill User Records in \"users\". Dim users= From p In oDbUser.USERs Where p.STATE=开发者_StackOverflow中文版 \"MI\" And p.STATUS = 1

The below code will fill User Records in "users".

    Dim users= From p In oDbUser.USERs Where p.STATE=开发者_StackOverflow中文版 "MI" And p.STATUS = 1

Can anyone tell me how can i use a foreaach loop in the result and take each indidual row items ?


I think you also need a Select clause in that linq query.

And that is the most relevant part, assuming a simple Select p you can do

For Each user In users 

Next user

(you may want to check the VB syntax)

0

精彩评论

暂无评论...
验证码 换一张
取 消