Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
codemunkie15 committed Oct 31, 2024
1 parent b6d0462 commit 87dbbae
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

[![Nuget](https://img.shields.io/nuget/v/EFCore.ChangeTriggers)](https://www.nuget.org/packages/EFCore.ChangeTriggers)

EFCore.ChangeTriggers is an Entity Framework Core extension for storing and querying changes made to entities using SQL triggers and migrations.
EFCore.ChangeTriggers is an Entity Framework Core extension that enables comprehensive entity history tracking using SQL triggers and migrations. Unlike traditional solutions that rely on SaveChanges() interceptors, which only capture changes made via the application, this library can track entity modifications from any source, ensuring that all changes, even those made directly in the database, are accurately recorded.

**SQL Server is currently the only supported EF Core provider.**

## Features
* Auto-generates SQL triggers to track changes for entities, using migrations.
* Captures changes from EF Core (including seed data) and raw SQL queries executed on the database.
* Optional configuration to store who made the change (ChangedBy) and where the change originated from (ChangeSource).
* Full query support on the entity changes to see previous values. See [EFCore.ChangeTriggers.ChangeEventQueries](https://github.com/codemunkie15/EFCore.ChangeTriggers/tree/main/src/EFCore.ChangeTriggers.ChangeEventQueries) if you need to project change entities into human-readable change events.
* Full query support on the entity changes to see previous values. See [EFCore.ChangeTriggers.ChangeEventQueries](https://github.com/codemunkie15/EFCore.ChangeTriggers/tree/main/src/EFCore.ChangeTriggers.ChangeEventQueries) if you need to project change entities into human-readable, individual property change events.

## Example populated change table

Expand All @@ -23,4 +23,4 @@ See the documentation here.
Unlike EF Core interceptors, which only capture changes made through the EF context, SQL triggers can also capture updates made through direct SQL commands (including seed data from migrations). This means that no matter how data is modified, whether through an application or directly in the database, you can keep a complete history of entity modifications.

## What about SQL Server Temporal Tables?
The main downside to temporal tables is that you can't add additional metadata columns to the history table (who made the change etc). EFCore.ChangeTriggers is able to inject metadata into the connection that the SQL trigger can then use when storing changes.
The main downside to temporal tables is that you can't add additional metadata columns to the history table (who made the change etc). EFCore.ChangeTriggers is able to inject metadata into the DB connection, that the SQL trigger can then use when storing changes.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ layout: home
nav_order: 0
---

EFCore.ChangeTriggers is an Entity Framework Core extension for storing and querying changes made to entities using SQL triggers and migrations.
EFCore.ChangeTriggers is an Entity Framework Core extension that enables comprehensive entity history tracking using SQL triggers and migrations. Unlike traditional solutions that rely on SaveChanges() interceptors, which only capture changes made via the application, this library can track entity modifications from any source, ensuring that all changes, even those made directly in the database, are accurately recorded.

### Features

Expand All @@ -17,7 +17,7 @@ EFCore.ChangeTriggers is an Entity Framework Core extension for storing and quer
Unlike EF Core interceptors, which only capture changes made through the EF context, SQL triggers can also capture updates made through direct SQL commands (including seed data from migrations). This means that no matter how data is modified, whether through an application or directly in the database, you can keep a complete history of entity modifications.

### What about SQL Server Temporal Tables?
The main downside to temporal tables is that you can't add additional metadata columns to the history table (who made the change etc). EFCore.ChangeTriggers is able to inject metadata into the connection that the SQL trigger can then use when storing changes.
The main downside to temporal tables is that you can't add additional metadata columns to the history table (who made the change etc). EFCore.ChangeTriggers is able to inject metadata into the DB connection, that the SQL trigger can then use when storing changes.

### Example populated change table

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public BaseChangeEventQueryBuilder(
public IQueryable<TChangeEvent> BuildChangeEventQuery()
{
var valueSelectors = configuration.Configurations[elementType];

return valueSelectors.Select(propertyBuilder.BuildChangeEventQuery).Aggregate(Queryable.Union);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
using EFCore.ChangeTriggers.Abstractions;
using EFCore.ChangeTriggers.ChangeEventQueries.Exceptions;
using EFCore.ChangeTriggers.ChangeEventQueries.Extensions;
using EFCore.ChangeTriggers.Metadata;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Internal;
using Microsoft.Extensions.DependencyInjection;
using System.Linq.Expressions;
using System.Reflection;

Expand Down

0 comments on commit 87dbbae

Please sign in to comment.