DropBear.Codex.TemporalHistory
2024.5.5
dotnet add package DropBear.Codex.TemporalHistory --version 2024.5.5
NuGet\Install-Package DropBear.Codex.TemporalHistory -Version 2024.5.5
<PackageReference Include="DropBear.Codex.TemporalHistory" Version="2024.5.5" />
paket add DropBear.Codex.TemporalHistory --version 2024.5.5
#r "nuget: DropBear.Codex.TemporalHistory, 2024.5.5"
// Install DropBear.Codex.TemporalHistory as a Cake Addin
#addin nuget:?package=DropBear.Codex.TemporalHistory&version=2024.5.5
// Install DropBear.Codex.TemporalHistory as a Cake Tool
#tool nuget:?package=DropBear.Codex.TemporalHistory&version=2024.5.5
DropBear.Codex.TemporalHistory
A library for managing and querying temporal history of entities using Entity Framework Core.
Features
- Temporal Queries: Retrieve historical changes of your entities within a given time range.
- Snapshot Retrieval: Fetch the state of an entity at a specific point in time.
- User-specific Changes: Filter changes by user to track individual contributions.
- Latest Changes: Quickly get the most recent changes to entities.
- Compare Changes: Compare the state of an entity between two timestamps and get detailed property changes.
Getting Started
Prerequisites
- .NET Core 8 or higher
- Entity Framework Core 8 or higher
Installation
To install DropBear.Codex.TemporalHistory, add the library to your project via NuGet:
dotnet add package DropBear.Codex.TemporalHistory
Configuration
Add the library to your project using one of the following methods:
Using Dependency Injection
public void ConfigureServices(IServiceCollection services)
{
services.AddTemporalHistory();
}
Using the Builder Pattern
var dbContext = new MyDbContext(options);
var manager = new TemporalManagerBuilder<MyDbContext>()
.UseDbContext(dbContext)
.Build();
Usage
// Retrieve entity history between two dates
var historyRecords = await temporalHistoryManager.GetHistoryAsync<MyEntity>(startDate, endDate);
// Get a snapshot of an entity at a specific point in time
var snapshot = await temporalHistoryManager.GetEntitySnapshotAt<MyEntity>(dateTime, id);
Contributing
Contributions are welcome! Please feel free to submit pull requests or open issues to discuss proposed changes or enhancements.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Authors
- DropBear (Terrence Kuchel) - Initial work - GitHub Profile
See also the list of contributors who participated in this project.
Acknowledgments
- Hat tip to anyone whose code was used
- Inspiration
- etc
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- DropBear.Codex.Core (>= 2024.5.6)
- Microsoft.EntityFrameworkCore (>= 8.0.4)
- Microsoft.EntityFrameworkCore.Abstractions (>= 8.0.4)
- Microsoft.EntityFrameworkCore.SqlServer (>= 8.0.4)
- ZString (>= 2.6.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|