VOOZH about

URL: https://www.nuget.org/packages/EntityChange

⇱ NuGet Gallery | EntityChange 6.1.0




👁 Image
EntityChange 6.1.0

dotnet add package EntityChange --version 6.1.0
 
 
NuGet\Install-Package EntityChange -Version 6.1.0
 
 
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="EntityChange" Version="6.1.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EntityChange" Version="6.1.0" />
 
Directory.Packages.props
<PackageReference Include="EntityChange" />
 
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 EntityChange --version 6.1.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EntityChange, 6.1.0"
 
 
#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 EntityChange@6.1.0
 
 
#: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=EntityChange&version=6.1.0
 
Install as a Cake Addin
#tool nuget:?package=EntityChange&version=6.1.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

EntityChange

Library to compare two entity object graphs detecting changes

👁 Build Project

👁 Coverage Status

👁 NuGet Version

Download

The EntityChange library is available on nuget.org via package name EntityChange.

To install EntityChange, run the following command in the Package Manager Console

PM> Install-Package EntityChange

More information about NuGet package available at https://nuget.org/packages/EntityChange

Features

  • Compare complete entity graph including child entities, collections and dictionaries
  • Collection compare by index or element equality
  • Dictionary compare by key
  • Custom value string formatter
  • Custom entity equality compare
  • Markdown or Html change report formatter

Configuration

Configure the Contact properties and collections.

EntityChange.Configuration.Default.Configure(config => config
 .Entity<Contact>(e =>
 {
 // set the FirstName display name
 e.Property(p => p.FirstName).Display("First Name");
 // compare the Roles collection by string equality
 e.Collection(p => p.Roles)
 .CollectionComparison(CollectionComparison.ObjectEquality)
 .ElementEquality(StringEquality.OrdinalIgnoreCase);
 // set how to format the EmailAddress entity as a string
 e.Collection(p => p.EmailAddresses).ElementFormatter(v =>
 {
 var address = v as EmailAddress;
 return address?.Address;
 });
 })
 .Entity<EmailAddress>(e =>
 {
 e.Property(p => p.Address).Display("Email Address");
 })
);

Comparison

Compare to Contact entities

// create comparer using default configuration
var comparer = new EntityComparer();

// compare original and current instances generating change list 
var changes = comparer.Compare(original, current).ToList();

Change Report

Sample output from the MarkdownFormatter

OUTPUT

  • Removed Administrator from Roles
  • Changed Email Address from user@Personal.com to user@gmail.com
  • Added user@home.com to Email Addresses
  • Changed Status from New to Verified
  • Changed Updated from 5/17/2016 8:51:59 PM to 5/17/2016 8:52:00 PM
  • Changed Zip from 10026 to 10027
  • Changed Number from 888-555-1212 to 800-555-1212
  • Added Blah to Categories
  • Changed Data from 1 to 2
  • Changed Data from ./home to ./path
Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on EntityChange:

Package Downloads
MediatR.CommandQuery.Audit

CQRS framework based on MediatR

KickStart.EntityChange

Provides EntityChange integration for KickStart, enabling efficient entity change tracking and startup configuration for .NET applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.1.0 160 6/3/2026
6.0.2 1,364 6/30/2025
6.0.1 3,023 3/24/2025
6.0.0 1,959 2/19/2025
6.0.0-beta.2 147 2/19/2025
6.0.0-beta.1 168 2/19/2025
5.3.2 3,296 1/19/2025
5.3.1 7,419 5/1/2024
5.3.0 749 4/25/2024
5.2.0 1,470 3/25/2024
5.1.0 5,424 7/28/2023
5.0.21 2,781 12/28/2022
5.0.18 23,254 11/9/2022
5.0.14 953 11/7/2022
5.0.12 929 11/5/2022
4.1.0.104 10,962 3/31/2021
4.1.0.98 1,030 2/15/2021
4.1.0.97 980 2/15/2021
4.1.0.71 20,766 4/26/2020
4.0.0.66 2,166 4/11/2020
Loading failed