private static ComparisonResult CompareObjects(Object expectedObj, Object actualObj, String[] ignoredMembers = null)
        {

            ComparisonConfig cfg = new ComparisonConfig()
            {
                IgnoreObjectTypes = true,
                IgnoreCollectionOrder = true,
                IgnoreUnknownObjectTypes = true,
                ComparePrivateFields = false,
                ComparePrivateProperties = false,
                MembersToIgnore = new List<string>() { "_entityWrapper" },
                CompareChildren = false,
                MaxStructDepth = 1,
                MaxDifferences = 20,
                TreatStringEmptyAndNullTheSame = true

            };
            if (ignoredMembers != null)
            {
                cfg.MembersToIgnore.AddRange(ignoredMembers);
            }
            //also add not mapped attributes
            if (actualObj.PropertiesWithAttribute<NotMappedAttribute>().Length > 0)
            {
                cfg.MembersToIgnore.AddRange(actualObj.PropertiesWithAttribute<NotMappedAttribute>());
            }

            //check on null objects
            CompareLogic cpl = new CompareLogic(cfg);


            var result = cpl.Compare(expectedObj, actualObj);


            return result;
        }