Exemple #1
0
            public T ExecuteScalar <T>(QueryModel queryModel)
            {
                SqlQueryModelVisitor visitor = new SqlQueryModelVisitor();

                visitor.VisitQueryModel(queryModel);
                string sql = visitor.GetSql();

                return(m_connection.ExecuteScalar <T>(sql, visitor.Parameters, m_transaction));
            }
Exemple #2
0
            public IEnumerable <T> ExecuteCollection <T>(QueryModel queryModel)
            {
                SqlQueryModelVisitor visitor = new SqlQueryModelVisitor();

                visitor.VisitQueryModel(queryModel);
                string sql = visitor.GetSql();

                return(m_connection.Query <T>(sql, visitor.Parameters, m_transaction));
            }