Skip to main content

Posts

Azure AI Search with C#: Build Smart Search (2026)

Learn Azure AI Search with C# — index data, run vector and hybrid queries, and add RAG to your .NET app. Start building intelligent search today. If your application's search box still runs a LIKE '%term%' query against SQL Server, your users are quietly suffering. They type "cheap laptop for uni" and get zero results because your catalogue says "affordable notebook for students." Azure AI Search with C# fixes exactly this problem: it combines classic keyword search, vector embeddings, and semantic reranking into a single managed service that you can drive from .NET with a few dozen lines of code. In this tutorial you'll build a working search index from scratch, run keyword, vector, and hybrid queries, and finish with a Retrieval Augmented Generation (RAG) pattern that grounds an LLM in your own data. This guide targets .NET 9 and the Azure.Search.Documents v11 SDK. Every snippet is runnable. We'll explain why each design choice matter...

Azure Cosmos DB C# Tutorial: Complete Guide (2026)

Learn Azure Cosmos DB with C# in this step-by-step tutorial. Master partition keys, RUs, LINQ queries, and .NET SDK best practices. Start building today! If you have ever watched a SQL Server database buckle under traffic from three continents at once, you already understand why Azure Cosmos DB exists. Working with Azure Cosmos DB C# applications gives you a globally distributed, multi-model database with single-digit millisecond reads, 99.999% availability, and elastic scale — all reachable through a first-class .NET SDK. This tutorial walks you through everything from your first container to advanced patterns like bulk ingestion, optimistic concurrency, and change feed processing. We will use the Microsoft.Azure.Cosmos v3 SDK on .NET 8/9, and every example is runnable. More importantly, we will explain why each decision matters — because in Cosmos DB, an innocent-looking design choice can multiply your monthly bill by ten. What Is Azure Cosmos DB and Why Should C# Develop...

C# Primary Constructors: Simplify Classes (C# 12 Guide)

Learn C# primary constructors with runnable examples, best practices and pitfalls. Cut boilerplate in C# 12 classes and DI services — start coding today. If you have ever written a service class in .NET and felt like you were typing the same parameter name three times — once in the constructor signature, once in the assignment, once in the field declaration — then the C# primary constructor is the feature you have been waiting for. Introduced in C# 12 (shipped with .NET 8 in November 2023), primary constructors let you declare constructor parameters directly on the class or struct declaration and use them anywhere in the body. This tutorial covers the syntax, the semantics that trip people up, real-world dependency injection patterns, and the pitfalls that static analysis will not always catch. What Is a C# Primary Constructor? A primary constructor is a parameter list attached directly to a type declaration. Those parameters are in scope for the entire class body — field init...

AI Agents in C#: Build Autonomous Agents with Semantic Kernel

Learn how to build AI agents in C# with Semantic Kernel. Step-by-step .NET tutorial with runnable code, plugins, tool calling and best practices. Start building today. Building AI agents in C# used to mean gluing together HTTP calls, JSON schemas and a lot of hopeful string parsing. That era is over. With Microsoft Semantic Kernel , .NET developers now have a first-class agent framework that handles tool calling, memory, planning and multi-agent collaboration — all with strongly typed C# code, dependency injection and the async patterns you already know. In this tutorial you'll learn how to build autonomous, task-solving AI agents in C# from scratch, understand why each piece exists, and avoid the pitfalls that burn most teams on their first production deployment. What Is an AI Agent (and How Is It Different From a Chatbot)? A chatbot answers. An agent acts . The practical difference comes down to one loop: Goal — the agent receives a task, not just a message (...

Git Best Practices for .NET Teams: Branching & PRs

Learn Git best practices for .NET teams — branching strategies, clean commits, and pull request reviews that scale. Start shipping safer C# code today. Most .NET teams don't lose time to hard algorithms. They lose it to a 4,000-line pull request nobody wants to review, a develop branch that hasn't been merged in three weeks, and a merge conflict in a .csproj file that silently drops a package reference. Adopting solid git best practices fixes more delivery problems than any refactor, because it changes how your team integrates work rather than how one developer writes it. This guide covers the Git workflow decisions that matter specifically for C# and .NET teams: which branching strategy to pick, how to write commits that survive a production incident, how to keep pull requests reviewable, and the .NET-specific pitfalls (solution files, generated code, secrets in appsettings.json ) that generic Git tutorials never mention. Why Git Best Practices Matter More in .NET C...

Build an AI Recommendation System in C# with ML.NET

Learn how to build an AI recommendation system in C# using ML.NET collaborative filtering and matrix factorization. Full code, best practices — start today. Every product team eventually gets the same request: "Can we show users what they'll probably like next?" If your stack is .NET, you don't need Python, a separate microservice, or a data science team to answer that. You can build a production-grade recommendation system in C# using ML.NET's matrix factorization trainer — the same collaborative filtering technique that powers the "because you watched…" rails on major streaming platforms. This tutorial walks through the full pipeline: loading rating data, training a model, evaluating it honestly, generating top-N recommendations, and shipping it inside an ASP.NET Core API. What Collaborative Filtering Actually Does Collaborative filtering makes a deceptively simple bet: people who agreed in the past will agree in the future . It ignores what a...

GitHub Actions CI/CD for .NET: Build, Test & Deploy Guide

Learn GitHub Actions CI/CD for .NET with a complete YAML workflow to build, test and deploy your app to Azure. Copy the pipeline and ship today. If you are still clicking "Publish" from Visual Studio to get your API into production, you are one tired Friday away from an outage. GitHub Actions .NET pipelines solve that problem: every push builds your solution, runs your tests, and — when the tests pass — ships the artifact to Azure, AWS, or your own server, without a human touching a button. In this tutorial you will build a complete GitHub Actions CI/CD workflow for a .NET 10 application from an empty YAML file to a production deployment with environment approvals, and you will understand why each block exists rather than just copying it. Everything below is runnable. You will need a GitHub repository, a .NET solution with at least one test project, and (for the deployment half) an Azure App Service or any host that accepts a zip deploy. Why GitHub Actions for a .NET ...