-1
我有linqpad下面的查詢工作,但它不工作時,我把它放在Visual Studio中,因爲aspnet_UsersInRoles顯示爲EDMX而不是一個關聯實體。我怎樣才能解決這個問題?如何使用LINQ協會,實體不可用
var memberships = from m in First5MembershipDB.aspnet_Membership
join u in First5MembershipDB.aspnet_Users on m.UserId equals u.UserId
join ur in First5MembershipDB.Aspnet_UsersInRoles on u.UserId equals ur.UserId
join r in First5MembershipDB.aspnet_Roles on ur.RoleId equals r.RoleId
join a in First5MembershipDB.Applications on r.WebApplicationID equals a.ApplicationId
使用關聯。 'u.Members' – SLaks
你有個例子嗎? – user1202606