public static int Execute(this IDbConnection dbconnection, ISQLinq query, IDbTransaction transaction = null, int?commandTimeout = null, CommandType?commandType = null) { var result = query.ToSQL(); var sql = result.ToQuery(); var parameters = new DictionaryParameterObject(result.Parameters); return(SqlMapper.Execute(dbconnection, sql, parameters, transaction, commandTimeout, commandType)); }
public static IEnumerable <dynamic> Query(this IDbConnection dbconnection, ISQLinq query, IDbTransaction transaction = null, bool buffered = true, int?commandTimeout = null, CommandType?commandType = null) { var result = query.ToSQL(); var sql = result.ToQuery(); var parameters = new DictionaryParameterObject(result.Parameters); return(SqlMapper.Query(dbconnection, sql, parameters, transaction, buffered, commandTimeout, commandType)); }