You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dotnet user-secrets set ConnectionString "server=localhost;dabase=test;"
Successfully saved ConnectionString = server=localhost;dabase=test; to the secret store.
Check user secrets
dotnet user-secrets list
ConnectionString = server=localhost;dabase=test;
Get Secrets in program.cs
var builder = new ConfigurationBuilder();
builder.AddUserSecrets<Program>();
var configuration = builder.Build();
Console.WriteLine(configuration["ConnectionString"]);
run
dotnet run
Hello World!
server=localhost;dabase=test;