我需要对我的数据计算一些连接操作,对这些操作的结果我需要使用WHERE语句。Linq如何使用在哪里结果加入
在我使用下面这个语法没有错误的时刻,但结果并不如预期。 当然,我需要将我的连接的结果分组并对其应用查询。
您能否给我提供一个代码示例?不幸的是,我在Linq很新,而且我无法做到。
var myImagesForUser = from i in context.CmsImagesContents
join c in context.CmsContents on i.ContentId equals c.ContentId
join a in context.CmsAuthors on c.AuthorId equals a.AuthorId
join u in context.aspnet_Users on a.UserId equals u.UserId
where u.UserId == (Guid)myLoggedInUser.ProviderUserKey
select i;
查询没什么问题你在找什么特定的代码示例? – 2011-06-16 09:24:34