Пример #1
0
        public void DeleteQueuesForEndpoint()
        {
            var connectionString = @"Data Source=.\SqlExpress;Database=Snippets.SqlTransport;Integrated Security=True";

            SqlHelper.EnsureDatabaseExists(connectionString);
            using (var sqlConnection = new SqlConnection(connectionString))
            {
                sqlConnection.Open();
                DeleteEndpointQueues.DeleteQueuesForEndpoint(
                    connection: sqlConnection,
                    schema: "dbo",
                    endpointName: "myendpoint");
            }
        }
Пример #2
0
        public async Task DeleteQueuesForEndpoint()
        {
            var connectionString = @"Data Source=.\SqlExpress;Database=samples;Integrated Security=True";

            using (var sqlConnection = new SqlConnection(connectionString))
            {
                await sqlConnection.OpenAsync()
                .ConfigureAwait(false);

                await DeleteEndpointQueues.DeleteQueuesForEndpoint(
                    connection : sqlConnection,
                    schema : "dbo",
                    endpointName : "myendpoint")
                .ConfigureAwait(false);
            }
        }