Example #1
0
        internal static StaticCommandConfig GetCommandConfig(Type commandType)
        {
            if (commandConfigurations.ContainsKey(commandType))
            {
                return(commandConfigurations[commandType]);
            }
            var newCommandConfig = new StaticCommandConfig(commandType);

            commandConfigurations.Add(commandType, newCommandConfig);
            return(newCommandConfig);
        }
Example #2
0
 internal static INewQueryable New(StaticCommandConfig commandConfig)
 {
     return(new Queryable(new CommandEngine(commandConfig)));
 }
Example #3
0
 internal ConfigurationBuilder WithConnection(string connection)
 {
     commandConfig = commandConfig.Copy();
     commandConfig.ConnectionString = connection;
     return(this);
 }
Example #4
0
 internal ConfigurationBuilder WithTransaction(DbTransaction transaction)
 {
     commandConfig             = commandConfig.Copy();
     commandConfig.Transaction = transaction;
     return(this);
 }
Example #5
0
 private ConfigurationBuilder(StaticCommandConfig commandConfig)
 {
     this.commandConfig = commandConfig ?? throw new ArgumentNullException(nameof(commandConfig));
 }