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(DapperDotNet.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(DapperDotNet.SqlMapper.Query(dbconnection, sql, parameters, transaction, buffered, commandTimeout, commandType)); }