示例#1
0
        protected virtual NhLinqExpression PrepareQuery(Expression expression, out IQuery query, out NhLinqExpression nhQuery)
        {
            var nhLinqExpression = new NhLinqExpression(expression, Session.Factory);

            query = Session.CreateQuery(nhLinqExpression);

            nhQuery = (NhLinqExpression)((ExpressionQueryImpl)query).QueryExpression;

            SetParameters(query, nhLinqExpression.ParameterValuesByName);
            SetResultTransformerAndAdditionalCriteria(query, nhQuery, nhLinqExpression.ParameterValuesByName);
            return(nhLinqExpression);
        }
示例#2
0
        private NhLinqExpression PrepareQuery(Expression expression, out IQuery query, out NhLinqExpression nhQuery)
        {
            var nhLinqExpression = new NhLinqExpression(expression);

            query = _session.CreateQuery(nhLinqExpression);

            nhQuery = query.As <ExpressionQueryImpl>().QueryExpression.As <NhLinqExpression>();

            SetParameters(query, nhLinqExpression.ParameterValuesByName);
            SetResultTransformerAndAdditionalCriteria(query, nhQuery, nhLinqExpression.ParameterValuesByName);
            return(nhLinqExpression);
        }
示例#3
0
 public IQuery CreateQuery(IQueryExpression queryExpression)
 {
     return(_session.CreateQuery(queryExpression));
 }