Azure Notification Hub where to specify connection info?

SSB 111 Reputation points


I am following the tutorial in the link below to send push notifications from my WebAPI - they are saying to specify the Notification Hub Name and the Connection string using dotnet user-secrets

Is there anyway i can just set these in the code directly?
or via the appsettings.json file?

I know its not best-practice, but this is a small app right now

dotnet user-secrets init
dotnet user-secrets set "NotificationHub:Name" <value>
dotnet user-secrets set "NotificationHub:ConnectionString" <value>

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
299 questions
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,325 questions
A set of technologies in the .NET Framework for building web applications and XML web services.
3,414 questions
{count} votes