我有EDSC,我尝试在select语句中连接两列。我尝试这样的事情:
<asp:EntityDataSource ID="srcData" runat="server" ConnectionString="name=edm"
DefaultContainerName="edm" EnableFlattening="False" EntitySetName="Staff"
Select="it.[StaffID], NewName = it.[Staff_Name] + it.[Staff_Surname]" Where="it.Retired=False">
有没有办法做这样的事情:NewName = it。[Staff_Name] + it。[Staff_Surname]
答案 0 :(得分:3)
您可以在EntityDataSource的AS
属性中使用Select
:
Select="it.StaffID, it.Staff_Name + it.Staff_Surname AS NewName"