int Execute(ISession session, InsertSqlInfo statement) { var sql = statement.ToString(session.SessionFactory.DbSettings.SqlDialect); var cmdr = new SqlCommandRunner(); var parameters = new List <QueryParam>(); parameters.AddRange(GeneratedKeys.Values); foreach (var queryParam in statement.Parameters) { if (!GeneratedKeys.ContainsKey(queryParam.Key)) { parameters.Add(queryParam.Value); } } return(cmdr.ExecuteNonQuery(session, sql, parameters.ToArray())); }
object Execute(ISession session, InsertSqlInfo statement, Type resultType) { if (resultType == null) { resultType = typeof(object); } var sql = statement.ToString(session.SessionFactory.DbSettings.SqlDialect); var cmdr = new SqlCommandRunner(); var parameters = new List <QueryParam>(); parameters.AddRange(GeneratedKeys.Values); foreach (var queryParam in statement.Parameters) { if (!GeneratedKeys.ContainsKey(queryParam.Key)) { parameters.Add(queryParam.Value); } } return(cmdr.ExecuteScalar(session, sql, resultType, parameters.ToArray())); }