Simple SQL Server Transport Usage

Component: SQL Server Transport
NuGet NServiceBus.SqlServer (3.x)
Target NServiceBus Version: 6.x

Prerequisites

  1. Ensure an instance of SQL Server Express is installed and accessible as .\SQLEXPRESS. Create a database SqlServerSimple.

Running the project

  1. Start both the Sender and Receiver projects
  2. At startup Sender will send a message to Receiver.
  3. Receiver will handle the message.

Code Walk-through

Configure the SQL Server Transport

var transport = endpointConfiguration.UseTransport<SqlServerTransport>();
transport.ConnectionString(@"Data Source=.\SqlExpress;Database=SqlServerSimple;Integrated Security=True");

Related Articles


Last modified