<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Manikandan Murali on Medium]]></title>
        <description><![CDATA[Stories by Manikandan Murali on Medium]]></description>
        <link>https://medium.com/@manidevcode?source=rss-706a91769351------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QctQ9CNIrI0jGYa4n2lKOQ@2x.jpeg</url>
            <title>Stories by Manikandan Murali on Medium</title>
            <link>https://medium.com/@manidevcode?source=rss-706a91769351------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 22 May 2026 13:31:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manidevcode/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Embracing Change: How .NET 9 is Redefining API Documentation with OpenAPI]]></title>
            <link>https://medium.com/@manidevcode/embracing-change-how-net-9-is-redefining-api-documentation-with-openapi-03ef17829f38?source=rss-706a91769351------2</link>
            <guid isPermaLink="false">https://medium.com/p/03ef17829f38</guid>
            <category><![CDATA[swagger-ui]]></category>
            <category><![CDATA[net-core]]></category>
            <dc:creator><![CDATA[Manikandan Murali]]></dc:creator>
            <pubDate>Fri, 10 Jan 2025 15:44:21 GMT</pubDate>
            <atom:updated>2025-01-10T15:44:21.097Z</atom:updated>
            <content:encoded><![CDATA[<h3>Embracing Change: How .NET 9 is Redefining API Documentation with OpenAPI</h3><p><strong>Introduction</strong></p><p>In recent years, <strong>Swagger</strong> has been a go-to solution for generating API documentation in the .NET ecosystem. However, with the release of <strong>.NET 9</strong>, Microsoft has decided to step away from <strong>Swagger</strong> as the default API documentation tool, opting for <strong>native OpenAPI support</strong> through the Microsoft.AspNetCore.OpenApi library. This shift has generated some discussions, particularly for developers who are accustomed to Swagger’s ease of use and interactive interface.</p><p>In this post, we’ll dive into what’s changed, why it matters, and how developers can adapt to this shift.</p><h3>What’s Changing in .NET 9?</h3><p>Swagger, once bundled by default, is now replaced by <strong>Microsoft.AspNetCore.OpenApi</strong>, a new library for generating <strong>OpenAPI specifications</strong>. The biggest change here is that the interactive Swagger UI is no longer included by default. Developers now have the option to use additional tools like <strong>Swashbuckle</strong> or <strong>NSwag</strong> to keep that feature.</p><h3>Setting Up OpenAPI in .NET 9</h3><p>Here’s how to quickly get started with OpenAPI in .NET 9:</p><ol><li><strong>Create a New Web API Project</strong>: If you don’t have a project, create one:</li></ol><pre>dotnet new webapi -n MyApi<br>cd MyApi</pre><p><strong>2. Add OpenAPI Support</strong>: The new <strong>Microsoft.AspNetCore.OpenApi</strong> library is required:</p><pre>dotnet add package Microsoft.AspNetCore.OpenApi</pre><p><strong>3. Update </strong><strong>Program.cs</strong> to Include OpenAPI:</p><pre>builder.Services.AddEndpointsApiExplorer();<br>builder.Services.AddSwaggerGen();  // Optional, if you want to use Swagger manually<br>var app = builder.Build();<br><br>app.UseOpenApi(); // Generates OpenAPI spec<br>app.UseSwaggerUi3(); // Optional, if you need Swagger UI</pre><p>Now, your API will have OpenAPI documentation generated and optionally display Swagger UI for testing endpoints.</p><h3>Alternatives to Swagger in .NET 9</h3><p>While <strong>Swagger</strong> is no longer bundled by default, you can still use tools like:</p><ul><li><strong>Swashbuckle</strong>: Add it manually if you want the familiar Swagger UI.</li><li><strong>NSwag</strong>: An actively maintained alternative with support for Swagger UI and OpenAPI generation.</li></ul><h3>Why This Matters</h3><p>By shifting to <strong>native OpenAPI support</strong>, Microsoft is streamlining API documentation within .NET 9, offering a more flexible and standardized approach. Although this removes the automatic inclusion of Swagger’s interactive UI, developers now have the ability to customize their documentation solutions.</p><p>Whether you choose to stick with <strong>Swashbuckle</strong>, explore <strong>NSwag</strong>, or fully embrace <strong>native OpenAPI</strong>, the move is a step toward better, more standardized API documentation in .NET.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03ef17829f38" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Different Types of Azure Functions]]></title>
            <link>https://medium.com/@manidevcode/exploring-different-types-of-azure-functions-1266dc4f90dd?source=rss-706a91769351------2</link>
            <guid isPermaLink="false">https://medium.com/p/1266dc4f90dd</guid>
            <category><![CDATA[azure-services]]></category>
            <category><![CDATA[azure-function-app]]></category>
            <category><![CDATA[azure-serverless]]></category>
            <category><![CDATA[azure-functions]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Manikandan Murali]]></dc:creator>
            <pubDate>Tue, 05 Sep 2023 11:49:37 GMT</pubDate>
            <atom:updated>2023-09-05T12:44:18.524Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*stWEyktkMyORLi4bp3ERBA.png" /><figcaption>Azure Functions</figcaption></figure><h3>Introduction</h3><p>Azure Functions is a serverless compute service offered by Microsoft Azure, allowing developers to build and deploy applications without worrying about the underlying infrastructure. With Azure Functions, you can execute code in response to various triggers, and it supports several types of functions to cater to different use cases. In this blog post, we’ll explore some of the key types of Azure Functions.</p><h3><strong>1. HTTP Trigger Functions:</strong></h3><ul><li>HTTP trigger functions are invoked via HTTP requests. They are commonly used for building APIs and web applications.</li><li>You can configure these functions to respond to various HTTP methods, such as GET, POST, PUT, DELETE, etc.</li><li>Ideal for building RESTful APIs and handling HTTP-based events.</li></ul><h3><strong>2. Timer Trigger Functions:</strong></h3><ul><li>Timer trigger functions are executed on a predefined schedule or time interval.</li><li>These functions are useful for implementing scheduled tasks, automated cleanup processes, and periodic data processing.</li></ul><h3><strong>3. Queue Trigger Functions:</strong></h3><ul><li>Queue trigger functions are triggered by messages in Azure Storage Queues, Azure Service Bus Queues, or Azure Event Hubs.</li><li>They are often used for asynchronous processing, decoupling components of a system, and handling events or messages.</li></ul><h3><strong>4. Blob Trigger Functions:</strong></h3><ul><li>Blob trigger functions respond to the creation or modification of blobs (binary large objects) in Azure Blob Storage.</li><li>They are excellent for scenarios involving file processing, image resizing, or data transformation when new blobs are added.</li></ul><h3><strong>5. Event Grid Trigger Functions:</strong></h3><ul><li>Event Grid trigger functions are invoked when events are published to Azure Event Grid topics or custom events.</li><li>They are suitable for building event-driven architectures and reacting to various events within Azure services.</li></ul><h3><strong>6. Service Bus Trigger Functions:</strong></h3><ul><li>Service Bus trigger functions process messages from Azure Service Bus topics or subscriptions.</li><li>They enable the development of reliable and scalable messaging solutions.</li></ul><h3><strong>7. Cosmos DB Trigger Functions:</strong></h3><ul><li>Cosmos DB trigger functions are triggered by changes in Azure Cosmos DB collections.</li><li>They help build real-time data processing applications and keep data in sync with downstream systems.</li></ul><h3><strong>8. IoT Hub Trigger Functions:</strong></h3><ul><li>IoT Hub trigger functions process telemetry data sent from IoT devices through Azure IoT Hub.</li><li>These functions are vital for building IoT solutions and performing real-time data analytics.</li></ul><h3><strong>9. Durable Functions:</strong></h3><ul><li>Durable Functions is an extension of Azure Functions that allows you to build stateful and serverless workflows.</li><li>They provide capabilities for orchestrating complex workflows, fan-out/fan-in patterns, and managing long-running processes.</li></ul><h3><strong>10. Custom Trigger Functions:</strong></h3><ul><li>Azure Functions can also be extended to create custom triggers tailored to your specific requirements.</li><li>This flexibility allows you to handle custom events or integrate with external systems seamlessly.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*83Mn3Nd0rcB8K-EmtivUFg.png" /></figure><h3>Conclusion</h3><p>By offering these various types of functions, Azure Functions empowers developers to build a wide range of serverless applications and microservices. Choosing the right function type for your project depends on the specific use case and the trigger mechanism that best fits your application’s needs. Whether you’re building a web API, processing data, or responding to events, Azure Functions has you covered with its versatile set of function types.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1266dc4f90dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Event grid webhook validation handshake]]></title>
            <link>https://medium.com/@manidevcode/event-grid-webhook-validation-handshake-71bba6e44fa1?source=rss-706a91769351------2</link>
            <guid isPermaLink="false">https://medium.com/p/71bba6e44fa1</guid>
            <category><![CDATA[eventgrid]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[dotnet6]]></category>
            <category><![CDATA[event-hub]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Manikandan Murali]]></dc:creator>
            <pubDate>Mon, 13 Mar 2023 16:28:02 GMT</pubDate>
            <atom:updated>2023-03-13T16:28:02.907Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ugCHY-HPUfoZPGg0AdJnLg.png" /><figcaption>Event grid webhook validation handshake</figcaption></figure><p>When you create an Event Grid webhook subscription, Event Grid sends a validation request to the endpoint you specified. This request contains a validation code that you must return to Event Grid to confirm that you control the endpoint.</p><p>Here’s an example of how to perform a webhook validation handshake with code:</p><ol><li>Create a webhook subscription with a validation URL endpoint. You can use the Azure CLI or Azure Portal to do this.</li><li>When Event Grid sends a validation request to the endpoint, you’ll receive a POST request with a validation code in the request body. The request will look like this:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l5O2iZdRDtBdYPbGR84CfA.gif" /><figcaption>Event grid webhook validation handshake Request</figcaption></figure><p>3. To validate your subscription, your endpoint must respond with the same validation code that was sent in the request body. Here’s an example of how to respond:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MXEhEJChV6EGFUaCAp0S0A.gif" /><figcaption>Event grid webhook validation handshake Validation Response</figcaption></figure><p>4. Event Grid will check if the validation code matches the code it sent, and if it does, the subscription will be validated and events will start flowing to your endpoint.</p><p>5. Note that you must respond with a 200 OK HTTP status code and an empty response body to confirm the subscription. If you don’t, Event Grid will continue to send validation requests until the subscription is confirmed.</p><h4><strong>Here’s an example of how to create a .NET POST method to handle the Event Grid webhook validation handshake with code:</strong></h4><pre>[HttpPost]<br>public IActionResult HandleEventGridSubscriptionValidation([FromBody]JObject eventData)<br>{<br>    // Get the validation code and validation URL from the request body<br>    string validationCode = eventData[&quot;validationCode&quot;].ToString();<br>    string validationUrl = eventData[&quot;validationUrl&quot;].ToString();<br><br>    // If the validation code exists, this is a validation request<br>    if (!string.IsNullOrEmpty(validationCode))<br>    {<br>        // Respond with the validation code to confirm the subscription<br>        return Ok(new<br>        {<br>            validationResponse = validationCode<br>        });<br>    }<br><br>    // If this is not a validation request, handle the event as desired<br>    // ...<br><br>    return Ok();<br>}</pre><h3><strong>Code Explanation:</strong></h3><p>In this example, the <strong>HandleEventGridSubscriptionValidation</strong> method takes in a JSON object from the request body using the <strong>FromBody </strong>attribute. It then extracts the validation code and validation URL from the JSON object.</p><p>If the validation code exists, the method responds with the validation code to confirm the subscription by returning an HTTP 200 OK status code and an anonymous object with a <strong>validationResponse </strong>property set to the validation code.</p><p>If this is not a validation request, the method can handle the event as desired and return an HTTP 200 OK status code.</p><p>Note that this example uses the <strong>Newtonsoft.Json.Linq.JObject</strong> class to deserialize the JSON object in the request body. You may need to add a reference to the <strong>Newtonsoft.Json</strong> NuGet package and include the <strong>using Newtonsoft.Json.Linq;</strong> directive at the top of your code file to use this class.</p><h3><strong>Conclusion:</strong></h3><p>In conclusion, the Event Grid webhook validation handshake with code is an important security feature that verifies the endpoint for your Event Grid subscription. By confirming the subscription with the validation code, you can ensure that events are only sent to valid endpoints. In.NET, you can create a POST method to handle the validation request and respond with the validation code to confirm the subscription.</p><h3><strong><em>References:</em></strong></h3><p><a href="https://learn.microsoft.com/en-us/azure/event-grid/receive-events?source=recommendations">Receive events from Azure Event Grid to an HTTP endpoint — Azure Event Grid | Microsoft Learn</a></p><p><a href="https://learn.microsoft.com/en-us/azure/event-grid/webhook-event-delivery">WebHook event delivery — Azure Event Grid | Microsoft Learn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71bba6e44fa1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improving Code Clarity with Global Usings in C#]]></title>
            <link>https://medium.com/@manidevcode/improving-code-clarity-with-global-usings-in-c-52cfb9c622e7?source=rss-706a91769351------2</link>
            <guid isPermaLink="false">https://medium.com/p/52cfb9c622e7</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[code-review]]></category>
            <dc:creator><![CDATA[Manikandan Murali]]></dc:creator>
            <pubDate>Sun, 05 Mar 2023 11:06:42 GMT</pubDate>
            <atom:updated>2023-03-05T11:06:42.494Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hBZVaHelsxpM0HTxk_Ht7A.png" /><figcaption>Improving Code Clarity with Global Usings in C#</figcaption></figure><h3><strong>Introduction</strong></h3><p>As software projects grow in complexity, managing namespaces can become a time-consuming task. Global usings in C# 10 are a new feature that allow developers to specify namespaces that will be implicitly included in all files within a project, without having to explicitly add a <strong>using </strong>directive to each file. In this blog post, we’ll take a closer look at global usings in C# and how they can help improve code clarity.</p><h3><strong>Explanation of how global usings work in C# 10</strong></h3><p>To use global usings, you need to define them in a file called “globalUsings.cs”, which should be located in the project’s root directory. This file is automatically included in all compilation units in the project, which means that the namespaces specified in the file are available to all the project’s files.</p><p><strong>Here’s an example of how global usings can be defined:</strong></p><pre>global using System;<br>global using System.Collections.Generic;<br>global using System.Linq;</pre><p>In this example, we’ve defined three global usings for commonly used namespaces in C#. Now, in any file within the project, we can use classes and functions from these namespaces without needing to include a using directive for each one.</p><p>For example, if we wanted to use the List class from the System.Collections.Generic namespace, we could simply write:</p><pre>var myList = new List&lt;int&gt;();</pre><p>The List class is available in the file because we defined the System.Collections.Generic namespace as a global using.</p><p>It’s important to note that global usings can also be combined with traditional using directives. If you need to use a namespace that is not included as a global using, you can still include a using directive for it in a specific file.</p><pre>using System.IO;<br><br>// ...<br><br>var fileStream = new FileStream(&quot;file.txt&quot;, FileMode.Open);</pre><p>In this example, we’re using the FileStream class from the System.IO namespace, which is not included as a global using. Therefore, we need to include a traditional using directive in the file.</p><h3><strong>Conclusion</strong></h3><p>In conclusion, global usings are a powerful new feature in C# 10 that can help to reduce code clutter and improve code readability. By including commonly used namespaces globally, developers can spend more time focusing on the core logic of their programs, and less time managing using directives.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52cfb9c622e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating Azure App Configuration with ASP.NET Core.]]></title>
            <link>https://medium.com/@manidevcode/integrating-azure-app-configuration-with-asp-net-core-a1313580a676?source=rss-706a91769351------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1313580a676</guid>
            <category><![CDATA[net-core-6]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[keyvault]]></category>
            <category><![CDATA[appconfig]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Manikandan Murali]]></dc:creator>
            <pubDate>Sun, 26 Feb 2023 08:51:53 GMT</pubDate>
            <atom:updated>2023-02-28T06:36:35.653Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r_5EP6j4oi8QEVu-Ch9FXQ.png" /><figcaption>Integrating Azure App Configuration with ASP.NET Core</figcaption></figure><h3><strong>Introduction</strong></h3><p>Azure App Configuration is a service that allows developers to store and manage configuration settings for their applications in a centralized location. This can be useful for applications that need to have different settings based on the environment they are running in or for applications that have multiple instances and need to share configuration settings.</p><p>We will look at how to use Azure App Configuration in a.NET Core application in this blog post. We will cover the following topics:</p><ol><li>Setting up an Azure App Configuration instance</li><li>Creating and managing configuration settings</li><li>Retrieving configuration settings in a .NET Core application</li></ol><h3>Setting up an Azure App Configuration instance</h3><p>To get started, we need to create an Azure App Configuration instance in the Azure portal. To do this, follow these steps:</p><ol><li>Navigate to the Azure portal (<a href="https://portal.azure.com/">https://portal.azure.com</a>).</li><li>Click on “Create a resource” in the left-hand menu.</li><li>Search for “App Configuration” and select it.</li><li>Fill in the required information, such as the subscription, resource group, and instance name.</li><li>Once the instance is created, navigate to it and copy the connection string. We will need this later in our code.</li></ol><h3>Creating and managing configuration settings</h3><p>Once we have our Azure App Configuration instance set up, we can start creating and managing configuration settings. To do this, we can use the Azure portal or the Azure CLI.</p><p>To create a new configuration setting in the Azure portal, follow these steps:</p><ol><li>Navigate to your Azure App Configuration instance.</li><li>Click on “Configuration settings” in the left-hand menu.</li><li>Click on “Add”</li><li>Enter the key and value for your configuration setting.</li></ol><h3>Retrieving configuration settings in a .NET Core application</h3><p>Now that we have our Azure App Configuration instance set up and our configuration settings created, we can retrieve them in ours .NET Core application. To do this, we will need to install the <strong>Azure.Extensions.AspNetCore.Configuration.Secrets</strong> NuGet package. This package provides an implementation of the <strong>IConfiguration </strong>interface that retrieves configuration settings from an Azure App Configuration instance.</p><p>To install the package, open a command prompt or terminal window and run the following command:</p><pre>dotnet add package Azure.Extensions.AspNetCore.Configuration.Secrets</pre><p>Next, we need to configure our application to use the Azure App Configuration provider. To do this, we can modify the Program.cs file in our .NET Core application as follows:</p><pre>using Microsoft.AspNetCore.Hosting;<br>using Microsoft.Extensions.Configuration;<br>using Microsoft.Extensions.Hosting;<br><br>namespace MyApp<br>{<br>    public class Program<br>    {<br>        public static void Main(string[] args)<br>        {<br>            CreateHostBuilder(args).Build().Run();<br>        }<br><br>        public static IHostBuilder CreateHostBuilder(string[] args)<br>        {<br>            return Host.CreateDefaultBuilder(args)<br>                 .ConfigureWebHostDefaults(webBuilder =&gt;<br>                 {<br>                     webBuilder.ConfigureAppConfiguration(config =&gt;<br>                     {<br>                         //To retrieve the connection string for the Azure App Configuration service<br>                         var appUri = config.Build().GetConnectionString(&quot;appConfiguration&quot;);<br><br>                         //To add the Azure App Configuration service to the application configuration. <br>                         config.AddAzureAppConfiguration(options =&gt;<br>                         {<br>                             //Managed Identity:To authenticate the application with the Azure App Configuration service. <br>                             var credential = new DefaultAzureCredential();<br><br>                             //To specify the URI for the Azure App Configuration service and the credential object for authentication<br>                             options.Connect(new Uri(appUri), credential);<br><br>                             //to configure the configuration settings are refresh. refresh behavior <br>                             options.ConfigureRefresh(refresh =&gt;<br>                             {<br>                                 //The Register method is called on the refresh object to register a named refresh event.The event is named refreshAll. <br>                                 refresh<br>                                     //Sentinel Key<br>                                     .Register(&quot;refreshAll&quot;, true)<br>                                     //The SetCacheExpiration method is called on the refresh object to set the cache expiration time for the configuration settings.<br>                                     //Here, the cache expiration time is set to 5 seconds. <br>                                     .SetCacheExpiration(TimeSpan.FromSeconds(5));<br>                             });<br>                         });<br><br>                     });<br>                     webBuilder.UseStartup&lt;Startup&gt;();<br>                 });<br>        }<br>    }<br>}</pre><h3><strong>In ConfigureServices Method</strong></h3><pre>//The AppConfiguration type is passed as a generic parameter to the Configure method,<br>//which specifies the type of the configuration object that will be bound to the AppConfiguration section of the application configuration.<br>services.Configure&lt;AppConfiguration&gt;(Configuration.GetSection(&quot;AppConfiguration&quot;));<br><br>//This will allow the application to dynamically retrieve configuration settings from the Azure App Configuration service at runtime,<br>//without requiring any code changes or application restarts.<br>services.AddAzureAppConfiguration();</pre><ul><li>This code block is configuring the Azure App Configuration service and binding a configuration section to a strongly typed <strong>AppConfiguration </strong>object in an ASP.NET Core application.</li><li>The <strong>Configuration </strong>type is passed as a generic parameter to the <strong>Configure</strong> method, which specifies the type of the configuration object that will be bound to the <strong>AppConfiguration </strong>section of the application configuration.</li><li>The <strong>AddAzureAppConfiguration</strong> method is then called on the <strong>services</strong> object to add the Azure App Configuration service to the application services.</li><li>This will allow the application to dynamically retrieve configuration settings from the Azure App Configuration service at runtime, without requiring any code changes or application restarts.</li></ul><h3><strong>In Configure </strong>Method</h3><pre>  //The Azure App Configuration middleware to the application pipeline,<br>  //the ASP.NET Core application can easily access and use configuration settings stored in the Azure App Configuration service,<br>  //making it easier to manage and update configuration settings across multiple environments and applications.<br>  app.UseAzureAppConfiguration();</pre><ul><li>This code block is adding middleware to an ASP.NET Core application that enables it to use the Azure App Configuration service.</li><li>The <strong>UseAzureAppConfiguration</strong> method is called on the <strong>app</strong> object to add the Azure App Configuration middleware to the application pipeline.</li></ul><h3><strong>In Controller</strong></h3><pre> // IOptions is used for accessing configuration values that are read once and do not change<br> //private readonly IOptions&lt;AppConfiguration&gt; _configuration;<br><br> //IOptionsSnapshot is used for accessing configuration values<br> //that can change during the application&#39;s lifetime.<br> private readonly IOptionsSnapshot&lt;AppConfiguration&gt; _configuration;<br><br> public AppConfigurationController(<br>    IOptionsSnapshot&lt;AppConfiguration&gt; configuration)<br>    {<br>      //&quot;configuration&quot; to retrieve the current configuration settings for the AppConfiguration type from the application configuration.<br>      _configuration = configuration;<br>    }<br><br>  [HttpGet]<br>  public string Get()<br>  {<br>    //This property represents a configuration setting that was stored in the Azure App Configuration service<br>    return _configuration.Value.Key1;<br>  }</pre><p>In this code, we are configuring our application to use the Azure App Configuration provider by adding it to the IConfigurationBuilder. We are also passing in the connection string for our Azure App Configuration instance, which we retrieve from our appsettings.json file.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1313580a676" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Search By Target Framework is now available on NuGet.org]]></title>
            <link>https://medium.com/@manidevcode/search-by-target-framework-is-now-available-on-nuget-org-715318fe7107?source=rss-706a91769351------2</link>
            <guid isPermaLink="false">https://medium.com/p/715318fe7107</guid>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[nuget-package]]></category>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[updates]]></category>
            <dc:creator><![CDATA[Manikandan Murali]]></dc:creator>
            <pubDate>Thu, 16 Feb 2023 03:02:32 GMT</pubDate>
            <atom:updated>2023-02-16T03:02:32.756Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WKhdUWOBSlvlTW3pef6YVw.png" /></figure><h3><strong>Introduction</strong></h3><p>The .NET ecosystem has seen remarkable growth in recent years, with new frameworks, libraries, and tools emerging to address a wide range of development needs. As the .NET ecosystem continues to grow, it becomes increasingly difficult for developers to find the right packages for their projects. That’s where NuGet.org comes in — a popular package repository that hosts over 200,000 packages. Recently, NuGet.org introduced a new feature that makes it easier to search for packages based on the target framework of your project.</p><h3><strong>Introducing Search By Target Framework</strong></h3><p>The new<strong> </strong><a href="https://devblogs.microsoft.com/nuget/introducing-search-by-target-framework-on-nuget-org"><strong>Search by Target Framework feature</strong></a> on <a href="https://www.nuget.org/packages"><strong>NuGet.org</strong></a> allows developers to search for packages based on the target framework(s) of their project. This feature is particularly useful for developers who work on projects that target multiple frameworks. The feature helps them find packages that are compatible with all of their target frameworks, thereby ensuring smooth and hassle-free development experience.</p><figure><img alt="Search By Target Framework" src="https://cdn-images-1.medium.com/max/1024/1*-Kk1lwKrtnmv8vesdhb99A.png" /><figcaption>Search By Target Framework</figcaption></figure><h3><strong>Using Search By Target Framework</strong></h3><p>Using the <a href="https://devblogs.microsoft.com/nuget/introducing-search-by-target-framework-on-nuget-org/"><strong>Search by Target Framework feature</strong></a> on <a href="https://www.nuget.org/packages"><strong>NuGet.org</strong></a> is straightforward. To use this feature, navigate to the search bar on NuGet.org and type in a search query. Once you have entered your search query, click on the “Filters” button to open the search filters. Under the “Target Framework” section, select the target framework(s) for your project. You can select multiple target frameworks if needed. Once you have selected the target framework(s), NuGet.org will display the packages that are compatible with the selected target framework(s) in the search results. This allows you to quickly find and download packages that are compatible with your project, without having to manually check each package’s compatibility.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*FgqK2ko4D60Ynm4BjetAag.png" /><figcaption><a href="https://devblogs.microsoft.com/nuget/introducing-search-by-target-framework-on-nuget-org/"><strong>Search by Target Framework feature</strong></a></figcaption></figure><h3>Benefits of Search By Target Framework</h3><p>The <a href="https://devblogs.microsoft.com/nuget/introducing-search-by-target-framework-on-nuget-org/"><strong>Search by Target Framework feature</strong></a> on <a href="https://www.nuget.org/packages"><strong>NuGet.org</strong></a> offers several benefits to developers, including:</p><ol><li><strong>Saves Time</strong>: The Search by <a href="https://learn.microsoft.com/en-us/dotnet/standard/frameworks">Target Framework</a> feature saves developers time by eliminating the need to manually check package compatibility with each target framework. This can help developers to find and download compatible packages faster, ultimately improving the efficiency of their development process.</li><li><strong>Ensures Compatibility</strong>: The feature ensures that developers are using packages that are compatible with all of their project’s target frameworks, thereby avoiding potential issues that could arise from using incompatible packages.</li><li><strong>Improves Quality</strong>: Using the right packages for a project can improve the overall quality of the project, making it more stable, secure, and performant. The Search by <a href="https://learn.microsoft.com/en-us/dotnet/standard/frameworks">Target Framework</a> feature helps ensure that developers are using the right packages for their project, which ultimately contributes to the quality of the final product.</li></ol><h3><strong>Conclusion</strong></h3><p>The <a href="https://devblogs.microsoft.com/nuget/introducing-search-by-target-framework-on-nuget-org/"><strong>Search by Target Framework feature</strong></a> on <a href="https://www.nuget.org/packages"><strong>NuGet.org</strong></a> is a valuable addition to the .NET ecosystem. It offers developers a convenient and efficient way to find packages that are compatible with their project’s target frameworks, ultimately improving the quality and efficiency of their development process. If you are a .NET developer, consider taking advantage of this new feature to streamline your package search and selection process.</p><p><strong>Note: </strong>Unfortunately its not Available on Visual Studio. They’re looking into it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=715318fe7107" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Connect .NET Core application with Application Insights.]]></title>
            <link>https://medium.com/@manidevcode/connect-net-core-application-with-application-insights-16293d441cab?source=rss-706a91769351------2</link>
            <guid isPermaLink="false">https://medium.com/p/16293d441cab</guid>
            <category><![CDATA[logger]]></category>
            <category><![CDATA[application-insights]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[dot-net-core]]></category>
            <dc:creator><![CDATA[Manikandan Murali]]></dc:creator>
            <pubDate>Wed, 15 Feb 2023 09:32:07 GMT</pubDate>
            <atom:updated>2023-02-15T11:03:44.006Z</atom:updated>
            <content:encoded><![CDATA[<h3>Connect .NET Core application with Application Insights</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ov1U_L0QUqmf_EC_0y5mMQ.png" /><figcaption>Connect .NET Core application with Application Insights</figcaption></figure><h4><strong>Introduction</strong></h4><p>Application Insights is a cloud-based application performance monitoring (APM) solution offered by Microsoft that allows you to monitor the health and performance of your .NET Core applications. By instrumenting your code, you can track things like request and response time, failures, and custom telemetry data that’s specific to your application. In this blog, we will go through the steps to connect your .NET Core application with Application Insights.</p><h4><strong>Step 1: Set up an Application Insights resource</strong></h4><p>The first step to get started with Application Insights is to set up an Application Insights resource in the Azure portal. If you don’t already have an Azure account, you can sign up for a free trial. Once you have an account, you can follow these steps to create a new Application Insights resource:</p><ol><li>Go to the Azure portal</li><li>Click on the “Create a resource” button</li><li>Select “<strong>Application Insights</strong>” from the list of available resources</li><li>Fill in the required information for your resource (e.g., name, subscription, resource group, location)</li><li>Click the “Create” button to create your resource</li></ol><h4>Step 2: Install the Microsoft.ApplicationInsights.AspNetCore NuGet package</h4><p>The next step is to install the <strong>Microsoft.ApplicationInsights.AspNetCore</strong> NuGet package in your .NET Core application. You can do this by using the NuGet Package Manager or by running the following command in the Package Manager Console:</p><pre>Install-Package Microsoft.ApplicationInsights.AspNetCore</pre><h4><strong>Step 3: Configure Application Insights in Startup.cs</strong></h4><p>The next step is to configure Application Insights in your Startup.cs file. You can do this by adding the following code to the ConfigureServices method:</p><pre>builder.Services.AddApplicationInsightsTelemetry(Configuration[&quot;ApplicationInsights:InstrumentationKey&quot;]);</pre><h4><strong>Step 4: Add the Application Insights instrumentation key to appsettings.json</strong></h4><p>The final step is to add your Application Insights instrumentation key to your “<strong>appsettings.json</strong>” file. You can find this key in the Azure portal, under the “Overview” section of your Application Insights resource.</p><pre>&quot;ApplicationInsights&quot;: {<br>     &quot;InstrumentationKey&quot;: &quot;&lt;YOUR INSTRUMENTATION KEY HERE&gt;&quot;<br>   }</pre><h4><strong>Step 5: Log Data to Application Insights</strong></h4><p>Now that you have configured the SDK, you can start logging data to your Application Insights resource. There are several ways to do this, including using the <strong>ILogger</strong> interface provided by .NET Core, custom telemetry events, and custom metrics.</p><p><strong>Using ILogger:</strong></p><p>You can use the built-in <strong>ILogger</strong> interface in .NET Core to log data to Application Insights. To do this, you can inject an instance of <strong>ILogger</strong> into your classes and use its methods to log data. For example:</p><pre>public class ApplicationInsights<br>{<br> private readonly ILogger&lt;ApplicationInsights&gt; _logger;<br><br> public ApplicationInsights(ILogger&lt;ApplicationInsights&gt; logger) =&gt; _logger = logger;<br><br> public void ApplicationInsightsLogger()<br> {<br>  _logger.LogInformation(&quot;ApplicationInsightsLogger Method was called.&quot;);<br> }<br>}</pre><h4>Conclusion</h4><p>In conclusion, logging data with Application Insights in a .NET Core application is a simple and powerful way to monitor, analyze, and troubleshoot your application. By following the steps outlined above, you can start logging data to your Application Insights resource and gain valuable insights into the performance and usage patterns of your application.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16293d441cab" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>