# Azure Functions (in-process) for Service Bus Upgrade Version 3 to 4 ## Code first API to set connection string Setting the connection string can now be done when calling `UseNServiceBus()` Instead of ```csharp functionsHostBuilder.UseNServiceBus(() => new ServiceBusTriggeredEndpointConfiguration(endpointName){ ConnectionString = "CONNECTIONSTRING" }); ``` use: ```csharp functionsHostBuilder.UseNServiceBus(endpointName, "CONNECTIONSTRING"); ```