开发者

Writing Lambda Query Expressions in VB.Net using linq to sql provider

开发者 https://www.devze.com 2022-12-18 09:02 出处:网络
I\'m just not understanding on how to create a lambda expression instead of using a regular comprehension linq queries. All of the examples i see are not query a database using linq to sql. i want to

I'm just not understanding on how to create a lambda expression instead of using a regular comprehension linq queries. All of the examples i see are not query a database using linq to sql. i want to able to construct a lambda expression that get my the orders from the northwind database where the country equals "us". I know how to construct this using the standard linq query, but just not using lambdas 开发者_运维问答in vb.net.


Not sure of the exact northwind structure but something like this probably:

Dim dc as new NorthwindDataConext()
Dim usOrders as List(of Order) = dc.Orders.Where(Function(o) o.Country = "US").ToList();
0

精彩评论

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