public static PersistenceSpecification <T> CheckInverseBag <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.CheckInverseBag(expression, propertyValue, (IEqualityComparer)null));
            }

            return(spec.CheckInverseBag(expression, propertyValue, new FuncEqualityComparer <TListElement>(propertiesToCompare)));
        }
 public static PersistenceSpecification <T> CheckInverseBag <T, TListElement>(this PersistenceSpecification <T> spec,
                                                                              Expression <Func <T, IEnumerable <TListElement> > > expression,
                                                                              IEnumerable <TListElement> propertyValue,
                                                                              Action <T, IEnumerable <TListElement> > listSetter)
 {
     return(spec.CheckInverseBag(expression, propertyValue, null, listSetter));
 }
 public static PersistenceSpecification <T> CheckInverseBag <T, TListElement>(this PersistenceSpecification <T> spec,
                                                                              Expression <Func <T, IEnumerable <TListElement> > > expression,
                                                                              IEnumerable <TListElement> propertyValue)
 {
     return(spec.CheckInverseBag(expression, propertyValue, (IEqualityComparer)null));
 }