2

I'm trying to execute this SQL query inside lightswitch:

Select distinct [columnName] from [table]

The query window only has Filter, Sort, and Parameters

I have arrived on the DataService.cs file where I can manualy edit the queries, but im stuck here:

    partial void QueryName_PreprocessQuery(ref IQueryable<ServiceUser> query)
    {
        query = query.Distinct();
    }

This selects the whole table. I want the distinct values of only one column. Note that I can add a view to the database and update it as an entity but thats not what I'm looking for..

4

0 回答 0