Table of Contents

Method ToListDistinct

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

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 CancellationToken

The cancellation token.

Returns

Task<List<TValue>>

A distinct list of retrieved values.

Type Parameters

TValue

The type of the values to retrieve.