Exemple #1
0
        public static int BulkInsertOracleDb <T>(this IDbConnection con, IEnumerable <T> dataList, Func <PropertyInfo, Boolean> filter, int linesPerBatch = 1000, int timeout = 0, DMLOptions options = null)
        {
            DMLOptions curOptions  = options ?? OracleDefaultOptions;
            string     commandText = filter != null ? Statements <T> .GetFilteredInsert(filter, curOptions) : Statements <T> .GetInsert(curOptions);

            return(con.BulkInsert(dataList, commandText, linesPerBatch, timeout, curOptions));
        }
Exemple #2
0
 public static int Insert <T>(this IDbConnection con, T data, Func <PropertyInfo, Boolean> columnFilter, IDbTransaction trn = null, int?timeout = 0, CommandType?commandType = null, DMLOptions options = null)
 {
     if (columnFilter == null)
     {
         return(Insert(con, data, trn, timeout, commandType, options));
     }
     return(con.Execute(Statements <T> .GetFilteredInsert(columnFilter, options), ToParamObject(data, options), trn, timeout, commandType));
 }