/// <summary>
 /// Initializes a new instance of the <see cref="SqlQueryExecutor"/> class
 /// by using the given sql connection provider and default command type.
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> that can be used to create
 /// connections for a sql server.
 /// </param>
 /// <param name="default_command_type">
 /// The <see cref="CommandType"/> to be used when executing a
 /// method that does not contain a parameter of that type.
 /// </param>
 public SqlQueryExecutor(SqlConnectionProvider sql_connection_provider,
                         CommandType default_command_type = CommandType.Text)
 {
     sql_connection_provider_ = sql_connection_provider;
     default_command_type_    = default_command_type;
     logger_ = MustLogger.ForCurrentProcess;
     cache_  = new ConcurrentDictionary <string, object>();
 }
Exemple #2
0
        public SqlAppState(SqlConnectionProvider sql_connection_provider,
                           bool supress_dtc = false)
        {
            update_state_ = new UpdateStateQuery(sql_connection_provider);
            get_state_    = new GetStateQuery(sql_connection_provider);
            add_state_    = new AddStateQuery(sql_connection_provider);
            remove_state_ = new RemoveStateQuery(sql_connection_provider);
            merge_state_  = new MergeStateQuery(sql_connection_provider);
            if_query_     = new SetIfQuery(sql_connection_provider);

            SupressTransactions = supress_dtc;
        }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SetStateCommand"/>
 /// using the given <param ref="sql_connection_provider" />
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> object that can be used to
 /// create connections to the data provider.
 /// </param>
 public SetStateCommand(SqlConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
     logger_ = MustLogger.ForCurrentProcess;
 }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlHiLoDao"/> class
 /// by using the given <see cref="SqlConnectionProvider"/> class.
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> object that can be used to
 /// access the SQL Server engine where the HiLo values are stored.
 /// </param>
 public SqlHiLoDao(SqlConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
 }
Exemple #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlStateDao"/> class by
 /// using the given <see cref="SqlConnectionProvider"/> object.
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> object that can be used to
 /// access a SQL Server database.
 /// </param>
 public SqlStateDao(SqlConnectionProvider sql_connection_provider) {
   sql_connection_provider_ = sql_connection_provider;
 }
Exemple #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NextHiQuery"/>
 /// using the given <param ref="sql_connection_provider" />
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> object that can be used to
 /// create connections to the data provider.
 /// </param>
 public NextHiQuery(SqlConnectionProvider sql_connection_provider) {
   sql_connection_provider_ = sql_connection_provider;
   logger_ = MustLogger.ForCurrentProcess;
   mapper_ = CreateMapper();
 }
 public AddStateQuery(SqlConnectionProvider sql_connection_provider) {
   sql_connection_provider_ = sql_connection_provider;
   logger_ = MustLogger.ForCurrentProcess;
   SupressTransactions = true;
 }
Exemple #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlHiLoDao"/> class
 /// by using the given <see cref="SqlConnectionProvider"/> class.
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> object that can be used to
 /// access the SQL Server engine where the HiLo values are stored.
 /// </param>
 public SqlHiLoDao(SqlConnectionProvider sql_connection_provider) {
   sql_connection_provider_ = sql_connection_provider;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlStateDao"/> class by
 /// using the given <see cref="SqlConnectionProvider"/> object.
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> object that can be used to
 /// access a SQL Server database.
 /// </param>
 public SqlStateDao(SqlConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StateByNameQuery"/>
 /// using the given <param ref="sql_connection_provider" />
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> object that can be used to
 /// create connections to the data provider.
 /// </param>
 public StateByNameQuery(SqlConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
     logger_ = MustLogger.ForCurrentProcess;
 }
Exemple #11
0
 public RemoveStateQuery(SqlConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
     logger_             = MustLogger.ForCurrentProcess;
     SupressTransactions = true;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SetStateCommand"/>
 /// using the given <param ref="sql_connection_provider" />
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> object that can be used to
 /// create connections to the data provider.
 /// </param>
 public SetStateCommand(SqlConnectionProvider sql_connection_provider) {
   sql_connection_provider_ = sql_connection_provider;
   logger_ = MustLogger.ForCurrentProcess;
 }
Exemple #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NextHiQuery"/>
 /// using the given <param ref="sql_connection_provider" />
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> object that can be used to
 /// create connections to the data provider.
 /// </param>
 public NextHiQuery(SqlConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
     logger_ = MustLogger.ForCurrentProcess;
     mapper_ = CreateMapper();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StateByNameQuery"/>
 /// using the given <param ref="sql_connection_provider" />
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> object that can be used to
 /// create connections to the data provider.
 /// </param>
 public StateByNameQuery(SqlConnectionProvider sql_connection_provider) {
   sql_connection_provider_ = sql_connection_provider;
   logger_ = MustLogger.ForCurrentProcess;
 }
Exemple #15
0
 public SqlMetricsDao(SqlConnectionProvider sql_connection_provider) {
   sql_connection_provider_ = sql_connection_provider;
   sql_query_executor_ = new SqlQueryExecutor(sql_connection_provider,
     CommandType.StoredProcedure);
   schema_ = sql_connection_provider_.Schema;
 }