Beispiel #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();
 }
Beispiel #2
0
        internal QueryOptions PrepareQueryOptions(QueryOptions options)
        {
            if (options == null)
            {
                return(QueryOptions.Clone().SetDefaults());
            }

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

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

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