将此 Linq 查询从查询语法转换为 lambda 表达式
我不确定我喜欢 linq 查询语法...这不是我的偏好。但我不知道使用 lambda 表达式这个查询会是什么样子,有人可以帮忙吗?
from securityRoles in user.SecurityRoles
from permissions in securityRoles.Permissions
where permissions.SecurableEntity.Name == "Unit" && permissions.PermissionType.Name == "Read"
orderby permissions.PermissionLevel.Value descending
select permissions
用户和安全角色之间存在多对多的关系,这使得这更加令人困惑。
谢谢! 凯莉
I'm not sure I like linq query syntax...its just not my preference. But I don't know what this query would look like using lambda expressions, can someone help?
from securityRoles in user.SecurityRoles
from permissions in securityRoles.Permissions
where permissions.SecurableEntity.Name == "Unit" && permissions.PermissionType.Name == "Read"
orderby permissions.PermissionLevel.Value descending
select permissions
There is a many-to-many relationship between users and security roles that makes this extra confusing.
Thanks!
Kelly
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
像这样:
Like this: