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); }
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); }
public IQuery CreateQuery(IQueryExpression queryExpression) { return(_session.CreateQuery(queryExpression)); }