public virtual void SetUpFixture()
		{
			// open the test connection
			_connectionStringBuilder = new SqlConnectionStringBuilder();
			_connectionStringBuilder.IntegratedSecurity = true;
			_connectionStringBuilder.AsynchronousProcessing = true;
			_connection = _connectionStringBuilder.Open();
		}
示例#2
0
		static void SqlConnectionStringBuilder_Open()
		{
			SqlConnectionStringBuilder database = new SqlConnectionStringBuilder(connectionString);
			// make other changes here

			// manage the lifetime ourselves
			using (IDbConnection c = database.Open())
			{
				c.QuerySql("SELECT * FROM Beer", Parameters.Empty);
			}
		}