Choosing between IConfiguration and IOptionsSnapshot in a .Net Core application

If you are building a .Net Core api and are using appsettings and/or Azure App configuration, you might have this question in mind. Since, this is the AI era, I keep asking my queries to chatgpt or copilot or bard and use my blog as the notes for myself and for my readers: Here is the prompt: What is the difference between IConfiguration and IOptionsSnapshot. When I am using Azure App Configuration in a .net core api what should I use out of the two? Let’s delve into the differences between  IConfiguration  and  IOptionsSnapshot , especially in the context of using Azure App Configuration in a .NET Core API. IConfiguration: Purpose :  IConfiguration  provides access to configuration settings (such as app settings, connection strings, etc.) from various sources (e.g., JSON files, environment variables, command-line arguments). Lifetime : It is a singleton service, meaning it retrieves configuration values once during application startup and caches them. Use Case : Suitable when you don’

How to generate angular clients using dotnet core?

 Problem:

I wanted to generate angular clients using .net core API

Solution:

  1. Refer https://github.com/domaindrivendev/Swashbuckle.AspNetCore#swashbuckleaspnetcorecli to generate openapi v3 compatible JSON
  2. Refer https://www.npmjs.com/package/@openapitools/openapi-generator-cli to generate angular clients.