Blog
Blog posts on .NET, Azure, and more.
Getting started with Microsoft.Extensions.AI
July 14, 2025 by Anuraj
dotnet ai
In this blog post, we’ll learn how to use a Microsoft.Extensions.AI in our .NET applications. In my earlier post I was using Microsoft.Extensions.AI to connect to my local SLM. We can use Microsoft.Extensions.AI so that we can write code using AI abstractions rather than a specific SDK. AI abstractions enable us to change the underlying AI model with minimal code changes. For this demo I am using Open AI API Key. We can use Azure Open AI or GitHub Models or Ollama. We can get the Open AI API Key from here. Once created, use dotnet user secret tool to store the key as secret or set the key as environment variable.
Leveraging Small Language Model as a Sidecar for Linux App Service
July 06, 2025 by Anuraj
dotnet azure ai
In this blog post, we’ll learn how to use a small language model aka SLM as a sidecar for Linux App Service. A small language model (SLM) is a Gen AI technology that functions like a large language model (LLM), but with a much smaller footprint. Small language models (SLMs) are increasingly fine-tuned on domain-specific datasets, enabling them to excel in targeted applications like specialized chat bots, document summarization, and industry-specific information retrieval. Their compact size not only boosts efficiency in these focused tasks but also makes them ideal for deployment on devices with limited computational resources—such as mobile phones, IoT devices, or edge computing environments—bringing the benefits of generative AI to more accessible and resource-constrained settings.
Seed Data in Entity Framework Core With Bogus
June 12, 2025 by Anuraj
dotnet efcore
In this blog post, we’ll learn how to Seed data in Entity Framework Core with Bogus. Bogus is a simple fake data generator for .NET languages like C#, F# and VB.NET. Bogus is fundamentally a C# port of faker.js and inspired by FluentValidation’s syntax sugar.
Building a Server-Sent Events (SSE) MCP Server with ASPNET Core
April 27, 2025 by Anuraj
dotnet AI MCP
In this blog post, we will learn how to implement MCP SSE servers using ASP.NET Core. The Model Context Protocol (MCP) is a new protocol that allows developers to create and manage context for AI models. It provides a way to define the context in which an AI model operates, making it easier to build applications that leverage AI capabilities.
Create API documentation with Scalar
April 07, 2025 by Anuraj
dotnet webapi
In this blog post, we’ll explore how to document your ASP.NET Core Web API using Scalar. In March 2024, the ASP.NET Core team announced the removal of the Swashbuckle.AspNetCore dependency from web templates starting with .NET 9 – GitHub Issue. As a replacement, Microsoft introduced a new package, Microsoft.AspNetCore.OpenApi, which provides built-in OpenAPI document generation similar to Swagger. However, it currently lacks a bundled UI. While you can still use Swagger UI, it’s no longer included in the templates by default. In this post, we’ll use Scalar as an alternative UI. Scalar offers a modern, visually appealing interface that makes it easy for developers to navigate and test APIs efficiently.
Copyright © 2025 Anuraj. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Powered by Jekyll. Hosted with ❤ by GitHub