Method ToListDistinct
ToListDistinct<TValue>(Expression<Func<T, TValue>>, Expression<Func<T, bool>>, CancellationToken)
Retrieves a distinct list of values from the database based on the provided selector and optional where clause.
public virtual Task<List<TValue>> ToListDistinct<TValue>(Expression<Func<T, TValue>> selector, Expression<Func<T, bool>> where, CancellationToken cancellationToken = default)
Parameters
selector
Expression<Func<T, TValue>>The selector expression to retrieve the values.
where
Expression<Func<T, bool>>The optional where clause expression to filter the values.
cancellationToken
CancellationTokenThe cancellation token.
Returns
Type Parameters
TValue
The type of the values to retrieve.