예제 #1
0
        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));
        }
예제 #2
0
        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));
        }