public static PersistenceSpecification <T> CheckInverseList <T, TListElement>(this PersistenceSpecification <T> spec,
                                                                               Expression <Func <T, IEnumerable <TListElement> > > expression,
                                                                               IEnumerable <TListElement> propertyValue,
                                                                               Action <T, TListElement> listItemSetter)
 {
     return(spec.CheckInverseList(expression, propertyValue, null, listItemSetter));
 }
        public static PersistenceSpecification <T> CheckInverseList <T, TListElement>(this PersistenceSpecification <T> spec,
                                                                                      Expression <Func <T, IEnumerable <TListElement> > > expression,
                                                                                      IEnumerable <TListElement> propertyValue,
                                                                                      params Func <TListElement, object>[] propertiesToCompare)
        {
            // Because of the params keyword, the compiler can select this overload
            // instead of the one above, even when no funcs are supplied in the method call.
            if (propertiesToCompare == null || propertiesToCompare.Length == 0)
            {
                return(spec.CheckList(expression, propertyValue, (IEqualityComparer)null));
            }

            return(spec.CheckInverseList(expression, propertyValue, new FuncEqualityComparer <TListElement>(propertiesToCompare)));
        }