示例#1
0
 protected internal DbContext(ContextProvider contextProvider,
                              QueryOptions queryOptions, BulkOptions bulkOptions, ReadOptions readOptions)
 {
     this.ContextProvider = contextProvider;
     this.QueryOptions    = queryOptions.Clone();
     this.BulkOptions     = bulkOptions.Clone();
     this.ReadOptions     = readOptions.Clone();
 }
示例#2
0
        internal BulkOptions PrepareBulkOptions(BulkOptions options)
        {
            if (options == null)
            {
                return(BulkOptions.Clone().SetDefaults());
            }

            var opt = ContextProvider.GetTyped(options, out var needClone);

            if (needClone)
            {
                opt = opt.Clone();
            }

            return(opt.SetDefaults(BulkOptions).SetDefaults());
        }