我有LinqDataSource
喜欢这个:
<asp:LinqDataSource ID="linqDSUsers" runat="server"
ContextTypeName="Repository.BBDatabaseDataContext"
Select="new (UserID,FirstName,LastName)" TableName="Users">
</asp:LinqDataSource>
如何将其转换为:
<asp:LinqDataSource ID="linqDSUsers" runat="server"
ContextTypeName="Repository.BBDatabaseDataContext"
Select="new (UserID,FullName = FirstName + LastName)" TableName="Users">
</asp:LinqDataSource>
非常感谢你。
答案 0 :(得分:3)
Select="new (UserID, FirstName + LastName As FullName)"