DapperExtensionsQueryOptions<T> Class
Definition
- Namespace
- Savvyio.Extensions.DapperExtensions
- Assemblies
- Savvyio.Extensions.DapperExtensions.dll
Specifies options that is related to DapperExtensionsDataStore<T>.
public class DapperExtensionsQueryOptions<T> : AsyncOptions, IAsyncOptions, IParameterObject
Type Parameters
T
- Inheritance
-
objectDapperExtensionsQueryOptions<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. |