tags:

views:

104

answers:

0

How can I select distinct records when using a declarative data source?

<asp:LinqDataSource ID="dsColors" runat="server" 
    ContextTypeName="Context" 
    OrderBy="Id, Name" 
    Select='new (Id, String.Concat(Id + ": " + Name) as ColorName)'
    TableName="Colors">
</asp:LinqDataSource>