BccCode.Privacy.ChangeHistory 0.13.3

dotnet add package BccCode.Privacy.ChangeHistory --version 0.13.3
                    
NuGet\Install-Package BccCode.Privacy.ChangeHistory -Version 0.13.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BccCode.Privacy.ChangeHistory" Version="0.13.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BccCode.Privacy.ChangeHistory" Version="0.13.3" />
                    
Directory.Packages.props
<PackageReference Include="BccCode.Privacy.ChangeHistory" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BccCode.Privacy.ChangeHistory --version 0.13.3
                    
#r "nuget: BccCode.Privacy.ChangeHistory, 0.13.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BccCode.Privacy.ChangeHistory@0.13.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BccCode.Privacy.ChangeHistory&version=0.13.3
                    
Install as a Cake Addin
#tool nuget:?package=BccCode.Privacy.ChangeHistory&version=0.13.3
                    
Install as a Cake Tool

BccCode.Privacy.ChangeHistory

Connects BccCode.Privacy.EntityFrameworkCore and BccCode.ChangeHistory on one model, so events, links, changes and history versions are read per organisation, like the current rows.

services.AddPrivacyChangeHistory();            // ChangeHistory's reader scope = the acting organisation

protected override void ConfigureEntities(ModelBuilder b)
{
    b.UsePrivacy();
    // ... entities, Personal(), Item() ...
    b.UsePrivacyChangeHistory();               // last
}

UsePrivacyChangeHistory():

  • FilterEventsByOrganisation(): a reader sees an event, its payload and trace only when all its links belong to the acting organisation. An event that spans organisations, or has a link without an owner, is read only with IgnoreQueryFilters() (maintenance).
  • FilterHistoryByCurrentRow(): history versions are read only while the current row passes the privacy filter.
  • HasEventOwner(<organisation>) on every personal table.
  • ExcludeFromVersioning() on the package's columns (usable, reader_org): a basis change makes no history version.

PrivacyChangeHistory.Check(context) refuses, at start-up, a ChangeHistory context with personal tables whose model was not set up this way. Hosting calls it.

In a mixed or ownerless event, Changes() and ChangesFor() keep the change to the reader's own row, with the event's name, actor and reason left empty.

Deleted rows

By default the history of a deleted row is hidden, as the row is. IncludeDeleted() opts one read in, for retract, undo and the audit of deletions:

var versions = await db.History.IncludeDeleted().Versions<Member>().Where(v => v.Entity.Id == id).ToListAsync();
await using var past = await db.History.IncludeDeleted().AsOfAsync(before);

A deleted row is shown only when the privacy filter passes on its last version: the row was the acting organisation's, and its usable flag for the active process was set when it was deleted. Another organisation never sees it, and IgnoreQueryFilters() is not needed (it would drop both checks).

Versions tested

BccCode.ChangeHistory 0.4.70 from nuget.org (EraseByIdAsync(ids, include) returning a MaintenanceResult per table, which counts only the rows it erased, and IncludeDeleted). It depends on EF Core 10.0.15 and Npgsql's provider 10.0.3, the versions these packages pin. Versions 0.4.43 to 0.4.63 are partial releases; do not use them.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on BccCode.Privacy.ChangeHistory:

Package Downloads
BccCode.Privacy.Hosting

One AddPrivacy() for BCC Privacy: the EF Core, ASP.NET Core and Wolverine packages wired together, defaults per environment, the privacy document at /.well-known/bcc-privacy, and the application's processes and data items pushed to the Privacy API at deploy.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.13.3 55 11/19/2026
0.13.2 51 11/19/2026
0.13.1 52 11/19/2026
0.13.0 52 11/19/2026
0.12.0 53 11/19/2026
0.11.0 55 11/19/2026
0.10.0 48 11/18/2026
0.9.2 43 11/18/2026