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)); }
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)); }