Skip to content

Instantly share code, notes, and snippets.

View sabbiryan's full-sized avatar

Md. Sabbir Ahamed sabbiryan

View GitHub Profile
@sabbiryan
sabbiryan / ComparerExtensions.cs
Created February 10, 2020 05:31
Dynamic object property value compare. Compare two object of same model type with different value and get the changed and matched property collection in a response with status.
public static class ComparerExtensions
{
public static ObjectCompareResponse DeepCompare(this object source, object comparer)
{
var response = new ObjectCompareResponse();
if (ReferenceEquals(source, comparer)) return response;
if ((source == null) || (comparer == null))
{