DeepDiff 1.2.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package DeepDiff --version 1.2.1
NuGet\Install-Package DeepDiff -Version 1.2.1
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="DeepDiff" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DeepDiff" Version="1.2.1" />
<PackageReference Include="DeepDiff" />
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 DeepDiff --version 1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DeepDiff, 1.2.1"
#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 DeepDiff@1.2.1
#: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=DeepDiff&version=1.2.1
#tool nuget:?package=DeepDiff&version=1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Sample
How do I get started
First configure DeepDiff to know what types you want to compare, in the startup of your application
var diffConfiguration = new DiffConfiguration();
diffConfiguration.Entity<Entity>()
.HasKey(x => new { x.StartsOn, x.Name })
.HasValues(x => new { x.Price, x.Volume })
.HasMany(x => x.SubEntities)
.OnInsert(cfg => cfg.SetValue(x => x.PersistChange, PersistChange.Insert))
.OnUpdate(cfg => cfg.SetValue(x => x.PersistChange, PersistChange.Update))
.OnDelete(cfg => cfg.SetValue(x => x.PersistChange, PersistChange.Delete));
diffConfiguration.Entity<SubEntity>()
.HasKey(x => x.SubName)
.HasValues(x => x.Energy)
.OnInsert(cfg => cfg.SetValue(x => x.PersistChange, PersistChange.Insert))
.OnUpdate(cfg => cfg.SetValue(x => x.PersistChange, PersistChange.Update))
.OnDelete(cfg => cfg.SetValue(x => x.PersistChange, PersistChange.Delete))
var deepDiff = diffConfiguration.CreateDeepDiff();
Then in your application code
var results = deepDiff.DiffMany(existingEntities, newEntities).ToArray();
Sample entities definition
public class Entity
{
public Guid Id { get; set; } // DB Key
public DateTime StartsOn { get; set; } // Business Key
public string Name { get; set; } // Business Key
public int Price { get; set; }
public int Volume { get; set; }
public PersistChange PersistChange { get; set; }
public List<SubEntity> SubEntities { get; set; }
}
public class SubEntity
{
public Guid Id { get; set; } // DB Key
public string SubName { get; set; } // Business Key
public int Energy { get; set; }
public PersistChange PersistChange { get; set; }
}
public enum PersistChange
{
None,
Inserted,
Updated,
Deleted
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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.
-
net5.0
- No dependencies.
-
net6.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DeepDiff:
| Package | Downloads |
|---|---|
|
DeepDiff.Extensions.Microsoft.DependencyInjection
DeepDeef extensions for Microsft Dependendy Injection |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.12.0 | 209 | 11/2/2025 |
| 1.11.0 | 193 | 9/24/2025 |
| 1.10.1 | 294 | 5/7/2025 |
| 1.10.0 | 196 | 4/11/2025 |
| 1.9.5 | 230 | 4/7/2025 |
| 1.9.4 | 228 | 4/7/2025 |
| 1.9.3 | 159 | 4/5/2025 |
| 1.9.2 | 177 | 4/4/2025 |
| 1.9.1 | 219 | 3/13/2025 |
| 1.9.0 | 295 | 3/4/2025 |
| 1.8.9 | 168 | 2/26/2025 |
| 1.8.8 | 158 | 2/26/2025 |
| 1.8.7 | 165 | 2/25/2025 |
| 1.8.6 | 166 | 2/25/2025 |
| 1.8.5 | 163 | 1/22/2025 |
| 1.8.4 | 167 | 1/21/2025 |
| 1.8.3 | 166 | 1/8/2025 |
| 1.8.2 | 211 | 7/2/2024 |
| 1.8.1 | 199 | 6/27/2024 |
| 1.2.1 | 229 | 12/15/2023 |
Loading failed