Exemplo n.º 1
0
        public static IEnumerable <TClassType> QueryObjects <TClassType>(this IObjectSpace objectSpace, Expression <Func <TClassType, bool> > expression, PersistentCriteriaEvaluationBehavior behavior = PersistentCriteriaEvaluationBehavior.InTransaction)
        {
            var objectType       = objectSpace.TypesInfo.FindBussinessObjectType <TClassType>();
            var criteriaOperator = objectSpace.GetCriteriaOperator(expression);

            return(objectSpace.GetObjects(objectType, criteriaOperator, behavior == PersistentCriteriaEvaluationBehavior.InTransaction).Cast <TClassType>());
        }