Method ToListDistinct
ToListDistinct<TValue>(string, Expression<Func<T, bool>>, CancellationToken)
Retrieves a distinct list of values for the specified column name.
public Task<List<TValue>> ToListDistinct<TValue>(string columnName, Expression<Func<T, bool>> where, CancellationToken cancellationToken = default)
Parameters
columnName
stringThe name of the column.
where
Expression<Func<T, bool>>The filter expression.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<List<TValue>>
A task that represents the asynchronous operation. The task result contains the distinct list of values.
Type Parameters
TValue
The type of the value.