Table of Contents

Method ToListDistinct

Namespace
Innova.Data.Entity
Assembly
Innova.Data.dll

ToListDistinct<TValue>(Expression<Func<T, TValue>>, QueryParameter<T>, CancellationToken)

Retrieves a distinct list of values from the database based on the specified selector and query parameters.

public virtual Task<List<TValue>> ToListDistinct<TValue>(Expression<Func<T, TValue>> selector, QueryParameter<T> queryParameter, CancellationToken cancellationToken = default)

Parameters

selector Expression<Func<T, TValue>>

An expression that specifies the value to select from each entity.

queryParameter QueryParameter<T>

The query parameters to apply to the query.

cancellationToken CancellationToken

A cancellation token that can be used to cancel the asynchronous operation.

Returns

Task<List<TValue>>

A task that represents the asynchronous operation. The task result contains a list of distinct values of type TValue, limited to the first 1000 results.

Type Parameters

TValue

The type of the value to select.