Example #1
0
        public static IChangeCollection <T> GetChanges <T>(T oldObject, T newObject, Expression <Func <T, object> > expression = null)
        {
            var a = GetValueOfExpressionFor(oldObject, expression);
            var b = GetValueOfExpressionFor(newObject, expression);

            var propertyPath = PropertyPathHelper.GetPropertyPath(expression);

            using (var context = new ContextPair(a, b))
                return(GetRecursiveChanges <ChangeCollection <T> >(context, propertyPath));
        }
 public bool Matches <T>(Expression <Func <T, object> > expression)
 {
     return(Matches(PropertyPathHelper.GetPropertyPath(expression)));
 }