Ejemplo n.º 1
0
 /// <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>();
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 7
0
 public AddStateQuery(SqlConnectionProvider sql_connection_provider) {
   sql_connection_provider_ = sql_connection_provider;
   logger_ = MustLogger.ForCurrentProcess;
   SupressTransactions = true;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 9
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;
 }
Ejemplo n.º 10
0
 /// <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;
 }
Ejemplo n.º 11
0
 public RemoveStateQuery(SqlConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
     logger_             = MustLogger.ForCurrentProcess;
     SupressTransactions = true;
 }
Ejemplo n.º 12
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;
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 14
0
 /// <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;
 }
Ejemplo n.º 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;
 }