コード例 #1
0
		/// <summary>
		/// Configures Rebus to store subscriptions in AdoNet.
		/// </summary>
		public static AdoNetSubscriptionStorageFluentConfigurer StoreInAdoNet(this RebusSubscriptionsConfigurer configurer, string connectionStringName, string subscriptionsTableName)
		{
			var connString = GetConnectionString(connectionStringName);
			var factory = new AdoNetConnectionFactory(connString.ConnectionString, connString.ProviderName);
			var storage = new AdoNetSubscriptionStorage(factory, subscriptionsTableName);

			configurer.Use(storage);

			return storage;
		}
コード例 #2
0
        /// <summary>
        /// Configures Rebus to store subscriptions in AdoNet.
        /// </summary>
        public static AdoNetSubscriptionStorageFluentConfigurer StoreInAdoNet(this RebusSubscriptionsConfigurer configurer, string connectionStringName, string subscriptionsTableName)
        {
            var connString = GetConnectionString(connectionStringName);
            var factory    = new AdoNetConnectionFactory(connString.ConnectionString, connString.ProviderName);
            var storage    = new AdoNetSubscriptionStorage(factory, subscriptionsTableName);

            configurer.Use(storage);

            return(storage);
        }