Table of Contents

Method ResultsAsync

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.Core.dll

ResultsAsync<T>(params IEnumerable<KeyValuePair<string, string?>>)

Asynchronously returns all records and iteratively attempts to map the fields to type T.

public ValueTask<IEnumerable<T>> ResultsAsync<T>(params IEnumerable<KeyValuePair<string, string?>> fieldMappingOverrides) where T : new()

Parameters

fieldMappingOverrides IEnumerable<KeyValuePair<string, string>>

An override map of field names to column names where the keys are the property names, and values are the column names.

Returns

ValueTask<IEnumerable<T>>

A task containing the list of results.

Type Parameters

T

The model type to map the values to (using reflection).

ResultsAsync<T>()

Asynchronously returns all records and iteratively attempts to map the fields to type T.

public ValueTask<IEnumerable<T>> ResultsAsync<T>() where T : new()

Returns

ValueTask<IEnumerable<T>>

A task containing the list of results.

Type Parameters

T

The model type to map the values to (using reflection).

ResultsAsync<T>(params IEnumerable<(string Field, string? Column)>)

Asynchronously returns all records and iteratively attempts to map the fields to type T.

public ValueTask<IEnumerable<T>> ResultsAsync<T>(params IEnumerable<(string Field, string? Column)> fieldMappingOverrides) where T : new()

Parameters

fieldMappingOverrides IEnumerable<(string Field, string Column)>

An override map of field names to column names where the keys are the property names, and values are the column names.

Returns

ValueTask<IEnumerable<T>>

A task containing the list of results.

Type Parameters

T

The model type to map the values to (using reflection).