DateTimeQueryableExtensions Class
Namespace: PTS
Assembly: PTS.Modules.DateTimeRangeComponent.dll
Provides a set of static methods for IQueryable
data structures with DateTime
properties.
Syntax
public static class DateTimeQueryableExtensions
Inheritance
Methods
ActiveAsOf<TSource>(IQueryable<TSource>, Expression<Func<TSource, DateTimeRange>>, DateTimeRange)
Produces queryable set limited to results with DateTimeRange property matching corresponding DateTimeRange value.
Declaration
public static IQueryable<TSource> ActiveAsOf<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, DateTimeRange>> property, DateTimeRange value)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable<TSource> | source | A queryable source to filter. |
System.Linq.Expressions.Expression<System.Func<TSource, DateTimeRange>> | property | Property expression with the DateTimeRange return type. |
DateTimeRange | value | A DateTimeRange value specifying the boundaries of filtered value range. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable<TSource> | A queryable set that contains elements from the input sequence that satisfy the conditions of the DateTimeRange value. |
Type Parameters
Name | Description |
---|---|
TSource | The type of the source elements. |
ActiveAsOf<TSource>(IQueryable<TSource>, Expression<Func<TSource, DateTime>>, Expression<Func<TSource, DateTime>>, DateTime, DateTime)
Produces queryable set limited to results with DateTime
from and until properties matching range of two DateTime
values.
Declaration
public static IQueryable<TSource> ActiveAsOf<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, DateTime>> fromProperty, Expression<Func<TSource, DateTime>> untilProperty, DateTime valueFrom, DateTime valueUntil)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable<TSource> | source | A queryable source to filter. |
System.Linq.Expressions.Expression<System.Func<TSource, System.DateTime>> | fromProperty | Property expression with the from field. |
System.Linq.Expressions.Expression<System.Func<TSource, System.DateTime>> | untilProperty | Property expression with the until field. |
System.DateTime | valueFrom | A |
System.DateTime | valueUntil | A |
Returns
Type | Description |
---|---|
System.Linq.IQueryable<TSource> | A queryable set that contains elements from the input sequence that satisfy the conditions of the |
Type Parameters
Name | Description |
---|---|
TSource | The type of the source elements. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown if from or until property expressions have return type other than simple |
ToGeneric<T1, T2, T3>(Func<T1, T2, T3>, T1, T2)
Declaration
public static MethodInfo ToGeneric<T1, T2, T3>(Func<T1, T2, T3> f, T1 unused1, T2 unused2)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T1, T2, T3> | f | |
T1 | unused1 | |
T2 | unused2 |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo |
Type Parameters
Name | Description |
---|---|
T1 | |
T2 | |
T3 |