Git Product home page Git Product logo

dropbear.codex.temporalhistory's Introduction

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

See also the list of contributors who participated in this project.

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

dropbear.codex.temporalhistory's People

Contributors

tkuchel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.