{"id":22882366,"url":"https://github.com/loresoft/entitychange","last_synced_at":"2025-04-05T08:07:42.713Z","repository":{"id":8365106,"uuid":"58135685","full_name":"loresoft/EntityChange","owner":"loresoft","description":"Library to compare two object graphs detecting change","archived":false,"fork":false,"pushed_at":"2025-03-24T20:19:18.000Z","size":324,"stargazers_count":37,"open_issues_count":1,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T07:08:07.992Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loresoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"loresoft"}},"created_at":"2016-05-05T14:12:59.000Z","updated_at":"2025-03-24T20:13:51.000Z","dependencies_parsed_at":"2024-03-25T21:47:58.361Z","dependency_job_id":"37b25d63-210c-4f19-9567-e690d325afc5","html_url":"https://github.com/loresoft/EntityChange","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loresoft%2FEntityChange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loresoft%2FEntityChange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loresoft%2FEntityChange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loresoft%2FEntityChange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loresoft","download_url":"https://codeload.github.com/loresoft/EntityChange/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305934,"owners_count":20917208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T18:17:11.120Z","updated_at":"2025-04-05T08:07:42.676Z","avatar_url":"https://github.com/loresoft.png","language":"C#","readme":"# EntityChange\n\nLibrary to compare two entity object graphs detecting changes\n\n[![Build Project](https://github.com/loresoft/EntityChange/actions/workflows/dotnet.yml/badge.svg)](https://github.com/loresoft/EntityChange/actions/workflows/dotnet.yml)\n\n[![Coverage Status](https://coveralls.io/repos/github/loresoft/EntityChange/badge.svg)](https://coveralls.io/github/loresoft/EntityChange)\n\n[![NuGet Version](https://img.shields.io/nuget/v/EntityChange.svg?style=flat-square)](https://www.nuget.org/packages/EntityChange/)\n\n## Download\n\nThe EntityChange library is available on nuget.org via package name `EntityChange`.\n\nTo install EntityChange, run the following command in the Package Manager Console\n\n    PM\u003e Install-Package EntityChange\n\nMore information about NuGet package available at\n\u003chttps://nuget.org/packages/EntityChange\u003e\n\n## Features\n\n- Compare complete entity graph including child entities, collections and dictionaries\n- Collection compare by index or element equality\n- Dictionary compare by key\n- Custom value string formatter\n- Custom entity equality compare\n- Markdown or Html change report formatter\n\n## Configuration\n\nConfigure the Contact properties and collections.\n\n```c#\nEntityChange.Configuration.Default.Configure(config =\u003e config\n    .Entity\u003cContact\u003e(e =\u003e\n    {\n        // set the FirstName display name\n        e.Property(p =\u003e p.FirstName).Display(\"First Name\");\n        // compare the Roles collection by string equality\n        e.Collection(p =\u003e p.Roles)\n            .CollectionComparison(CollectionComparison.ObjectEquality)\n            .ElementEquality(StringEquality.OrdinalIgnoreCase);\n        // set how to format the EmailAddress entity as a string\n        e.Collection(p =\u003e p.EmailAddresses).ElementFormatter(v =\u003e\n        {\n            var address = v as EmailAddress;\n            return address?.Address;\n        });\n    })\n    .Entity\u003cEmailAddress\u003e(e =\u003e\n    {\n        e.Property(p =\u003e p.Address).Display(\"Email Address\");\n    })\n);\n```\n\n## Comparison\n\nCompare to Contact entities\n\n```c#\n// create comparer using default configuration\nvar comparer = new EntityComparer();\n\n// compare original and current instances generating change list \nvar changes = comparer.Compare(original, current).ToList();\n```\n\n## Change Report\n\nSample output from the `MarkdownFormatter`\n\n**OUTPUT** \n\n* Removed `Administrator` from `Roles`\n* Changed `Email Address` from `user@Personal.com` to `user@gmail.com`\n* Added `user@home.com` to `Email Addresses`\n* Changed `Status` from `New` to `Verified`\n* Changed `Updated` from `5/17/2016 8:51:59 PM` to `5/17/2016 8:52:00 PM`\n* Changed `Zip` from `10026` to `10027`\n* Changed `Number` from `888-555-1212` to `800-555-1212`\n* Added `Blah` to `Categories`\n* Changed `Data` from `1` to `2`\n* Changed `Data` from `./home` to `./path`\n\n\n\n","funding_links":["https://github.com/sponsors/loresoft"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floresoft%2Fentitychange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floresoft%2Fentitychange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floresoft%2Fentitychange/lists"}