public ParameterContainer(Database.DatabaseProvider databaseProvider) { if (databaseProvider == null) throw new ArgumentNullException("databaseProvider"); this.databaseProvider = databaseProvider; this.parameters = new Dictionary<string, IDbDataParameter>(); }
/// <summary> /// Initializes a new instance of the <see cref="TransactionManager"/> class. /// </summary> /// <param name="typeOfFactory">The type of factory.</param> /// <exception cref="System.ArgumentNullException">typeOfFactory</exception> public TransactionManager(Type typeOfFactory) { if (typeOfFactory == null) throw new ArgumentNullException("typeOfFactory"); ConnectionStringAttribute attiribute = typeOfFactory.GetCustomAttributes(typeof(ConnectionStringAttribute), false).Cast<ConnectionStringAttribute>().FirstOrDefault(); this.databaseProvider = new DatabaseProvider(attiribute.Name); }
/// <summary> /// Initializes a new instance of the <see cref="TransactionManager"/> class. /// </summary> /// <param name="connectionStringName">Name of the connection string.</param> /// <exception cref="System.ArgumentNullException">connectionStringName</exception> public TransactionManager(string connectionStringName) { if (string.IsNullOrEmpty(connectionStringName)) throw new ArgumentNullException("connectionStringName"); this.databaseProvider = new DatabaseProvider(connectionStringName); }