protected virtual InternalSqlLog CreateInternalSqlLog(String displaySql, Object[] args, Type[] argTypes) { InternalSqlLog sqlLog = new InternalSqlLog(); sqlLog.RawSql = this.Sql; sqlLog.CompleteSql = displaySql; sqlLog.BindArgs = args; sqlLog.BindArgTypes = argTypes; return(sqlLog); }
protected String GetLastCompleteSql() { try { InternalSqlLogRegistry sqlLogRegistry = FindInternalSqlLogRegistry(); if (sqlLogRegistry == null) { return(null); } InternalSqlLog sqlLog = sqlLogRegistry.Last; if (sqlLog == null) { return(null); } return(sqlLog.CompleteSql); } catch (Exception) { return(null); } }