【发布时间】:2011-01-19 06:34:55
【问题描述】:
例如:
<asp:EntityDataSource ID="EntityDataSource2" runat="server"
ConnectionString="name=AdventureWorksEntities"
DefaultContainerName="AdventureWorksEntities"
EnableUpdate="True" EntitySetName="Employee"
Select="" Where="it.EmployeeID = @selEmpID">
<WhereParameters>
<asp:ControlParameter ControlID="GridView1" Name="selEmpID" Type="Int32" PropertyName="SelectedValue" />
</WhereParameters>
</asp:EntityDataSource>
“它”是由 EntityDataSource 生成的吗? "it" 是 Employee 的实体别名,但如何定义呢?
例如,如果我通过以下属性包含其他实体:
Include="Users,Permissions"
如何为不同的实体定义不同的别名 例如:
emp = 员工 usr = 用户 perm = 权限
【问题讨论】: