SqlServerDbSetExtensions.TemporalAsOf<TEntity> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Applies temporal 'AsOf' operation on the given DbSet, which only returns elements that were present in the database at a given point in time.
Temporal information is stored in UTC format on the database, so any DateTime arguments in local time may lead to unexpected results.
Temporal queries are always set as 'NoTracking'.
public static System.Linq.IQueryable<TEntity> TemporalAsOf<TEntity> (this Microsoft.EntityFrameworkCore.DbSet<TEntity> source, DateTime utcPointInTime) where TEntity : class;
static member TemporalAsOf : Microsoft.EntityFrameworkCore.DbSet<'Entity (requires 'Entity : null)> * DateTime -> System.Linq.IQueryable<'Entity (requires 'Entity : null)> (requires 'Entity : null)
<Extension()>
Public Function TemporalAsOf(Of TEntity As Class) (source As DbSet(Of TEntity), utcPointInTime As DateTime) As IQueryable(Of TEntity)
Type Parameters
- TEntity
Parameters
- source
- DbSet<TEntity>
Source DbSet on which the temporal operation is applied.
- utcPointInTime
- DateTime
DateTime representing a point in time for which the results should be returned.
Returns
- IQueryable<TEntity>
An IQueryable representing the entities at a given point in time.
Remarks
See Using SQL Server temporal tables with EF Core for more information.
Applies to
Feedback
Submit and view feedback for