How to join with LinQ to (typed) dataset?

拈花ヽ惹草 提交于 2019-11-30 15:36:56

I am afraid that someone will come and start throwing rocks at me but I will take my chances. I would probably start with this:

var AccessRules = from ar in aspnet_AccessRule
            from rar in aspnet_Role
            from r in aspnet_Roles
            from uir in aspnet_UsersInRoles
            where ar.idaccessrule == rar.fiAccessRule
            where rar.fiRole == r.RoleId
            where r.RoleId == uir.RoleId
            select ar;

Hmmm.. I actuall don't know how your dataset looks, but I think you get the point from this pseudocode.

Edit: here is the link to tool that might help you: Linqer

Hams

This thread might help you convert your SQL to LINQ:

What is the syntax for an inner join in LINQ to SQL?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!