Table of Contents

DapperExtensionsQueryOptions<T> Class

Definition

Namespace
Savvyio.Extensions.DapperExtensions
Assemblies
Savvyio.Extensions.DapperExtensions.dll
Source
src/Savvyio.Extensions.DapperExtensions/DapperExtensionsQueryOptions.cs

Specifies options that is related to DapperExtensionsDataStore<T>.

public class DapperExtensionsQueryOptions<T> : AsyncOptions, IAsyncOptions, IParameterObject

Type Parameters

T
Inheritance
object
DapperExtensionsQueryOptions<T>
Implements
Inherited Members

Examples

This example shows how DapperExtensionsQueryOptions<T> expresses a field predicate that a DapperExtensionsDataStore<T> can apply.

using DapperExtensions;
using DapperExtensions.Predicate;
using Savvyio.Extensions.DapperExtensions;

namespace ExampleApp;

public sealed class PredicateOptionsExample
{
    public DapperExtensionsQueryOptions<OrderProjection> Create()
    {
        return new DapperExtensionsQueryOptions<OrderProjection>
        {
            Predicate = order => order.Status,
            Op = Operator.Eq,
            Value = "Pending"
        };
    }
}

public sealed class OrderProjection
{
    public long Id { get; set; }

    public string Status { get; set; } = string.Empty;
}

Constructors

Name Description
DapperExtensionsQueryOptions()

Initializes a new instance of the DapperExtensionsQueryOptions<T> class.

Properties

Name Description
Function

Gets or sets the database function of the Field<T>(Expression<Func<T, object>>, Operator, object, bool, bool, DatabaseFunction, string).

FunctionParameters

Gets or sets the parameters to the Function of the Field<T>(Expression<Func<T, object>>, Operator, object, bool, bool, DatabaseFunction, string).

Not

Gets or sets a value that inverts the comparision operator of the Field<T>(Expression<Func<T, object>>, Operator, object, bool, bool, DatabaseFunction, string).

Op

Gets or sets the comparison operator of the Field<T>(Expression<Func<T, object>>, Operator, object, bool, bool, DatabaseFunction, string).

Predicate

Gets or sets the predicate of the Field<T>(Expression<Func<T, object>>, Operator, object, bool, bool, DatabaseFunction, string).

UseColumnPrefix

Gets or sets a value indicating whether generated SQL should have column prefix of the Field<T>(Expression<Func<T, object>>, Operator, object, bool, bool, DatabaseFunction, string).

Value

Gets or sets the value of the Field<T>(Expression<Func<T, object>>, Operator, object, bool, bool, DatabaseFunction, string).

See Also