Skip to main content

Posts

gRPC in C# .NET: Build High-Performance APIs (2026 Guide)

Learn gRPC in C# .NET with Protocol Buffers. Build fast, type-safe APIs with streaming, deadlines and interceptors. Start the full tutorial now. If you have ever watched a JSON REST API buckle under chatty microservice traffic, gRPC in C# is the fix you have been looking for. gRPC is a contract-first RPC framework built on HTTP/2 and Protocol Buffers, and the .NET implementation is one of the fastest in the entire gRPC ecosystem. Instead of hand-writing controllers, DTOs and HttpClient wrappers, you describe your service once in a .proto file and the toolchain generates strongly typed server bases and clients for you. This guide walks through building a production-grade gRPC service in ASP.NET Core: the protobuf contract, the server, the client, all four call types, deadlines, interceptors, retries, JSON transcoding, and the pitfalls that bite teams in month three. Every example runs on .NET 8 or later (the snippets below were verified against .NET 10). Why Choose gRPC in C# ...
Recent posts

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...