snowy | switching accounts
snowy | switching accounts
CC#
Created by zobweyt on 7/16/2023 in #help
✅ What is the best way to setup app configuration using IHostBuilder?
but tl;dr:
// appsettings.json
"Position": {
"Title": "Editor",
"Name": "Joe Smith"
}
// appsettings.json
"Position": {
"Title": "Editor",
"Name": "Joe Smith"
}
// Program.cs
builder.Services.Configure<PositionOptions>(builder.Configuration.GetSection(PositionOptions.Position));
// Program.cs
builder.Services.Configure<PositionOptions>(builder.Configuration.GetSection(PositionOptions.Position));
// Injecting it using DI
public class FooController
{
private readonly PositionOptions _options;

public FooController(IOptions<PositionOptions> options)
{
_options = options.Value;
}
}
// Injecting it using DI
public class FooController
{
private readonly PositionOptions _options;

public FooController(IOptions<PositionOptions> options)
{
_options = options.Value;
}
}
6 replies
CC#
Created by zobweyt on 7/16/2023 in #help
✅ What is the best way to setup app configuration using IHostBuilder?
6 replies
CC#
Created by zobweyt on 7/16/2023 in #help
✅ What is the best way to setup app configuration using IHostBuilder?
Read this
6 replies
CC#
Created by Hulkstance on 7/15/2023 in #help
❔ Key Vault + AppConfiguration usage
As long you're not exposing any secrets
8 replies
CC#
Created by Hulkstance on 7/15/2023 in #help
❔ Key Vault + AppConfiguration usage
Kind of the correct way to use it
8 replies
CC#
Created by Hulkstance on 7/15/2023 in #help
❔ Key Vault + AppConfiguration usage
So your approach is fine
8 replies
CC#
Created by Hulkstance on 7/15/2023 in #help
❔ Key Vault + AppConfiguration usage
But secrets will always need to be stored in the Key Vault
8 replies
CC#
Created by Hulkstance on 7/15/2023 in #help
❔ Key Vault + AppConfiguration usage
You can have configurations in your AppConfiguration, Environment Variables, or even the appsettings.json.
8 replies
CC#
Created by The Fog from Human Resources on 7/12/2023 in #help
❔ Massive issue with Authentication
np
161 replies
CC#
Created by The Fog from Human Resources on 7/12/2023 in #help
❔ Massive issue with Authentication
and congrats
161 replies
CC#
Created by The Fog from Human Resources on 7/12/2023 in #help
❔ Massive issue with Authentication
.
161 replies
CC#
Created by The Fog from Human Resources on 7/12/2023 in #help
❔ Massive issue with Authentication
just to make sure its correct
161 replies
CC#
Created by The Fog from Human Resources on 7/12/2023 in #help
❔ Massive issue with Authentication
check the status code
161 replies
CC#
Created by The Fog from Human Resources on 7/12/2023 in #help
❔ Massive issue with Authentication
Don't call the base. anymore
161 replies
CC#
Created by The Fog from Human Resources on 7/12/2023 in #help
❔ Massive issue with Authentication
you know that swagger does that for you right
161 replies
CC#
Created by The Fog from Human Resources on 7/12/2023 in #help
❔ Massive issue with Authentication
they will handle the status code iirc
161 replies