EntityDataSource问题 [英] EntityDataSource Issue

查看:115
本文介绍了EntityDataSource问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,经过一小时的尝试和错误,我决定发布问题。

 Ok, after hour of try and error I decided to post the question.

我试图将Entlude属性与EntityDataSource的Select属性结合使用。

I am trying to use the Include property in conjuction with the Select property of the EntityDataSource.

我收到以下错误:

查询的结果类型既不是EntityType,也不是具有实体元素类型的CollectionType 。只能为具有这些结果类型之一的查询指定包含路径。

如果我不使用Include属性,一切都很好但当然我也需要组织,因为我有1:N关系:

If I don't user the Includeproperty everything is fine but of course I also need the Organization because I have 1:N relation:

< asp EntityDataSource ID =" EntityDataSource_PracticeSite" runat =" server" ConnectionString =" name = RecruitmentAndRetentionEntities" ; DefaultContainerName =" RecruitmentAndRetentionEntities" EntitySetName =" PracticeSite" 选择 = " it.PracticeSiteID,it.Name,Count(it.PracticeSiteID)AS P" GroupBy =" it.PracticeSiteID,it.Name" 包含 =" Organization">

<asp:EntityDataSource ID="EntityDataSource_PracticeSite" runat="server" ConnectionString="name=RecruitmentAndRetentionEntities" DefaultContainerName="RecruitmentAndRetentionEntities" EntitySetName="PracticeSite" Select= "it.PracticeSiteID, it.Name, Count(it.PracticeSiteID) AS P" GroupBy="it.PracticeSiteID, it.Name" Include="Organization">

任何帮助都将不胜感激。

Any help would be appreciated.

谢谢

Stephane

推荐答案

任何人都可以帮我这个吗?
Anyone can help me on this?


这篇关于EntityDataSource问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆