In Query 的 Linq 表达式链语法
我有一个查询,似乎无法在表达式方法链语法中复制。我有两个表“User”和“UserPayment”。 User 和 UserPayment 具有一对多的关系,即一个 User 可以有多个 UserPayment。
只是想知道获取在特定日期付款的所有用户的语法是什么?或者甚至获取所有已付款的用户?
另请注意,我是用 VB 编写的。
谢谢
I have a query that I cannot seem to replicate in expression method chain syntax. I have two tables "User" and "UserPayment". User and UserPayment have a one to many relation i.e. One User can have many UserPayments.
Just wondering what the syntax is to get all users that have made a payment on a certain date? Or even get all users that have made a payment at all?
Also to note I am writing in VB.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您也许可以点击 UserPayments,使用
where
子句按日期进行过滤,并从那里获取不同的用户。像这样的东西吗?
VB 点表示法让我无法理解,但在 C# 中,我会这样做(抱歉,我无法准确地告诉您您正在寻找的内容):
Sounds like you might be able to hit the UserPayments, use a
where
clause to filter by your date, and get the distinct Users from there.Something like this?
The VB dot-notation escapes me, but in C#, I'd do this (sorry I can't get you quite exactly what you're looking for):