public void ConfigureServices(IServiceCollection services) { services.AddSingleton <IDocumentStoreHolder>(new DocumentStoreHolder("{Raven db endpoint}")); services.AddTransient <IPeopleRepository, PeopleRepository>(); var azureStringConnection = "Endpoint={your namespace for azure service bus}/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey={Access key of RootManageSharedAccessKey}"; var bus = BusFactory .CreateSendOnly(azureStringConnection); services.AddSingleton(bus); services.AddMvc(); bus.StartAsync(); }