Class TemporalBuilderExtensions
- Namespace
- FluentCommand.Query
- Assembly
- FluentCommand.SqlServer.dll
Provides extension methods for integrating SQL Server temporal table queries (FOR SYSTEM_TIME
) into select query builders.
public static class TemporalBuilderExtensions
- Inheritance
-
TemporalBuilderExtensions
- Inherited Members
Methods
Temporal(SelectBuilder, Action<TemporalBuilder>)
Adds a temporal table clause (FOR SYSTEM_TIME
) to the select query using a custom TemporalBuilder configuration.
public static SelectBuilder Temporal(this SelectBuilder selectBuilder, Action<TemporalBuilder> builder)
Parameters
selectBuilder
SelectBuilderThe SelectBuilder to extend with temporal table support.
builder
Action<TemporalBuilder>An action to configure the TemporalBuilder for the temporal query.
Returns
- SelectBuilder
The same SelectBuilder instance for fluent chaining.
Exceptions
- ArgumentNullException
Thrown if
selectBuilder
orbuilder
isnull
.
Temporal<TEntity>(SelectEntityBuilder<TEntity>, Action<TemporalBuilder>)
Adds a temporal table clause (FOR SYSTEM_TIME
) to the entity select query using a custom TemporalBuilder configuration.
The table and schema are preset from the entity type.
public static SelectEntityBuilder<TEntity> Temporal<TEntity>(this SelectEntityBuilder<TEntity> selectBuilder, Action<TemporalBuilder> builder) where TEntity : class
Parameters
selectBuilder
SelectEntityBuilder<TEntity>The SelectEntityBuilder<TEntity> to extend with temporal table support.
builder
Action<TemporalBuilder>An action to configure the TemporalBuilder for the temporal query.
Returns
- SelectEntityBuilder<TEntity>
The same SelectEntityBuilder<TEntity> instance for fluent chaining.
Type Parameters
TEntity
The entity type representing the table for the temporal query.
Exceptions
- ArgumentNullException
Thrown if
selectBuilder
orbuilder
isnull
.