# CSharp-Coder > Tested C# and .NET tutorials ## Posts - [Minimal APIs in .NET 8: Build Fast APIs (2026 Tutorial)](https://csharp-coder.com/2026/06/minimal-apis-in-net-8-build-fast-apis.html): Learn how to build lightweight Minimal APIs in .NET 8 with C#. Step-by-step tutorial, code examples, and best practices. Start building fast APIs today! - [gRPC in .NET 10: Service, Client, Streaming and Gotchas](https://csharp-coder.com/2026/06/grpc-in-net-build-high-performance-apis.html): Short answer: gRPC in .NET uses Grpc.AspNetCore on the server and Grpc.Net.Client on the client. - [Best AI Code Generation Tools for C# Developers in 2026](https://csharp-coder.com/2026/06/best-ai-code-generation-tools-for-c.html): Which AI is best for C# coding? - [How to Build a REST API with ASP.NET Core 8 (Step by Step)](https://csharp-coder.com/2026/06/how-to-build-rest-api-with-aspnet-core_01032348498.html): Learn how to build a REST API with ASP.NET Core 8 step by step with runnable C# code, EF Core, CRUD endpoints, and best practices. Start building today! - [C# String Interpolation, StringBuilder & Performance Guide](https://csharp-coder.com/2026/06/c-string-interpolation-stringbuilder.html): Learn C# string interpolation, StringBuilder, and string performance best practices with runnable code examples. Boost speed and write cleaner code today. - [C# Interface vs Abstract Class: When to Use Each on .NET 10](https://csharp-coder.com/2026/06/c-interface-vs-abstract-class-when-to.html): Short answer: use an interface to describe what a type can do. - [Repository Pattern in C# with EF Core: Examples and Pitfalls](https://csharp-coder.com/2026/06/repository-pattern-in-c-complete-guide.html): Short answer: A repository puts your data access behind an interface (IProductRepository), so business code and controllers don't touch DbContext and can be unit tested with a mock. - [C# Nullable Reference Types: Fix CS8618, CS8602 and More](https://csharp-coder.com/2026/06/c-nullable-reference-types-how-to.html): Short answer: nullable reference types (C# 8 and later) let you say whether a reference can be null: string means "never null", string? means "may be null". - [ASP.NET Core JWT Authentication Tutorial (2026 Guide)](https://csharp-coder.com/2026/06/aspnet-core-jwt-authentication-tutorial.html): Learn ASP.NET Core JWT authentication step by step with runnable C# code, best practices, and common pitfalls. Start securing your API today! - [C# LINQ Examples on .NET 10: LeftJoin, CountBy and Pitfalls](https://csharp-coder.com/2026/06/c-linq-tutorial-5-practical-examples.html): Short answer: LINQ is a set of extension methods in System.Linq for filtering, shaping, sorting, grouping and joining any IEnumerable. - [.NET Microservices Architecture with ASP.NET Core (.NET 10)](https://csharp-coder.com/2026/06/net-microservices-architecture-complete.html): Short answer: a .NET microservices architecture is a set of small ASP.NET Core services, each owning one business capability and its own database, talking to each other through an API gateway for synchronous calls and a message broker for everything that can wait. - [React js CRUD Example Step by Step](https://csharp-coder.com/2023/04/react-js-crud-example-step-by-step.html): Here's an example of building a simple CRUD application for managing a list of books. - [Angular 14 Form Validation](https://csharp-coder.com/2023/03/angular-14-form-validation.html): First, in your component HTML file, you can create a form using the form and input tags. - [Angular AuthGuard: Functional Route Guards with Examples](https://csharp-coder.com/2023/03/how-to-use-authguard-in-angular-14.html): Short answer: in current Angular an AuthGuard is a plain function of type CanActivateFn. - [Angular Date Pipe: Formats, Time Zones and Locales](https://csharp-coder.com/2023/03/angular-date-pipe-tutorial-with-date.html): Short answer: the Angular date pipe is {{ value | date:'format':'timezone':'locale' }}. With no arguments it prints mediumDate (Sep 28, 2026). - [Angular 404 on Page Refresh After Deployment: 5 Server Fixes](https://csharp-coder.com/2022/08/angular-14-404-error-during-refresh.html): Short answer: your Angular app works until you refresh a page or open a deep link like /products/42, then the server returns 404 Not Found. - [Angular 14 CRUD Operation with Web API .Net 6.0](https://csharp-coder.com/2022/08/angular-14-crud-example-with-web-api.html): In this article, we will learn the angular crud (create, read, update, delete) tutorial with ASP.NET Core 6 web API. - [Send an Email via SMTP with MailKit Using .NET 6](https://csharp-coder.com/2022/07/send-email-via-smtp-with-mailkit-using.html): This tutorial show you how to send an email in .NET 6.0 using the MailKit email client library. - [CRUD operations in web api using net 6.0](https://csharp-coder.com/2022/07/crud-operation-in-aspnet-core-6-web-api.html): This tutorial gives you step by step implementation of creating CRUD operations using ASP.NET Web API Core. - [Access Modifiers in C#](https://csharp-coder.com/2022/06/access-modifiers-in-c.html): In this article, we will learn about the access modifiers in C#. - [How To Import Data From Excel To SQL Table Using Query](https://csharp-coder.com/2022/05/how-to-import-data-from-excel-to-sql.html): This article demonstrates how to import the data from a Microsoft Excel sheet to a SQL Server table in Microsoft SQL Server. - [C# 15 Union Types: Examples, Exhaustive Switch and Gotchas](https://csharp-coder.com/2026/10/csharp-15-union-types.html): Short answer: C# 15 adds union types. You declare one with the union keyword and a list of case types. - [Moq in C# Tutorial: Setup, Verify and Common Errors](https://csharp-coder.com/2026/10/moq-in-c-tutorial-setup-verify-and.html): Short answer: Create a mock with new Mock(), tell it what to return with Setup(...).Returns(...) - [IExceptionHandler in ASP.NET Core: Global Error Handling](https://csharp-coder.com/2026/10/iexceptionhandler-in-aspnet-core-global.html): Short answer: Implement IExceptionHandler, register it with builder.Services.AddExceptionHandler(), add builder.Services.AddProblemDetails() and call app.UseExceptionHandler(). - [System.Text.Json vs Newtonsoft: .NET 10 Migration Gotchas](https://csharp-coder.com/2026/10/systemtextjson-vs-newtonsoft-net-10.html): Short answer: on .NET 10, use System.Text.Json for new code and for most migrations. - [HttpClient in .NET 10: IHttpClientFactory, Timeouts, Retries](https://csharp-coder.com/2026/10/httpclient-in-net-10-ihttpclientfactory.html): Short answer: don't create a new HttpClient() per request. - [CSharpier vs dotnet format: C# Code Formatting on .NET 10](https://csharp-coder.com/2026/10/csharpier-vs-dotnet-format.html): Short answer: CSharpier is an opinionated formatter: it rewraps long lines, sorts usings and gives every file the same layout, with almost nothing to configure. - [Compile C# at Runtime in .NET: CSharpCodeProvider to Roslyn](https://csharp-coder.com/2026/10/compile-csharp-at-runtime-roslyn.html): Short answer: CSharpCodeProvider cannot compile code on .NET Core or .NET 5+. - [C# for Unity: Beginner to Advanced Guide (2026)](https://csharp-coder.com/2026/09/c-for-unity-beginner-to-advanced-guide.html): Learn C# for Unity from beginner to advanced in 2026 — MonoBehaviour lifecycle, coroutines, async, performance and DOTS. Start building games today. - [API Security Best Practices 2026: Secure REST APIs in C#](https://csharp-coder.com/2026/09/api-security-best-practices-2026-secure.html): Learn API security best practices for 2026 with runnable C# and ASP.NET Core examples — JWT, rate limiting, BOLA fixes. Start hardening your REST API today. - [Serilog .NET Tutorial: Structured Logging Best Practices](https://csharp-coder.com/2026/09/serilog-net-tutorial-structured-logging.html): Learn Serilog structured logging in .NET with runnable C# examples, sinks, enrichers, and production best practices. Start logging smarter today. - [Azure Cosmos DB C# Tutorial: Complete Guide (2026)](https://csharp-coder.com/2026/09/azure-cosmos-db-c-tutorial-complete.html): 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! - [Git Best Practices for .NET Teams: Branching & PRs](https://csharp-coder.com/2026/09/git-best-practices-for-net-teams.html): Learn Git best practices for .NET teams — branching strategies, clean commits, and pull request reviews that scale. Start shipping safer C# code today. - [GitHub Actions CI/CD for .NET: Build, Test & Deploy Guide](https://csharp-coder.com/2026/09/github-actions-cicd-for-net-build-test.html): 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. - [C# Span Tutorial: Zero-Allocation Performance Guide](https://csharp-coder.com/2026/09/c-span-tutorial-zero-allocation.html): Learn C# Span and Memory with runnable examples, benchmarks, and best practices. Start writing zero-allocation, high-performance .NET code today. - [How to Hash Passwords in C#: PBKDF2 & bcrypt Guide](https://csharp-coder.com/2026/09/how-to-hash-passwords-in-c-pbkdf2.html): Learn password hashing in C# the right way: salting, PBKDF2, bcrypt, and ASP.NET Core Identity, with runnable .NET code and best practices. Read the guide now. - [AWS S3 C# Tutorial: Upload, Download & List Files in .NET](https://csharp-coder.com/2026/09/aws-s3-c-tutorial-upload-download-list.html): Learn AWS S3 with C# step by step: upload, download, list and delete files, generate presigned URLs, and use S3 in ASP.NET Core. Read the full guide now. - [TorchSharp Tutorial: Deep Learning in C# with PyTorch](https://csharp-coder.com/2026/09/torchsharp-tutorial-deep-learning-in-c.html): Learn TorchSharp in C#: build, train, and deploy PyTorch neural networks in .NET with GPU support. Follow the tutorial and start coding today. - [Azure Functions vs AWS Lambda for C#: 2026 Cost & Speed](https://csharp-coder.com/2026/09/azure-functions-vs-aws-lambda-for-c.html): Azure Functions vs AWS Lambda for C# in 2026: cold starts, Native AOT, pricing math and real code. See the pricing math and pick the right platform. - [Prompt Engineering in C#: Write Better AI Prompts (2026)](https://csharp-coder.com/2026/09/prompt-engineering-in-c-write-better-ai.html): Learn prompt engineering in C# with runnable .NET examples: system prompts, few-shot, JSON output and prompt testing. Start writing better AI prompts today. - [C# Exception Handling Best Practices (2026 Guide)](https://csharp-coder.com/2026/09/c-exception-handling-best-practices.html): Learn C# exception handling best practices: custom exceptions, global handlers with IExceptionHandler, and structured logging in .NET. Read the guide now! - [Dependency Injection in C#: A Complete Tutorial (2026)](https://csharp-coder.com/2026/09/dependency-injection-in-c-complete.html): Learn dependency injection in C# from scratch. Build loosely coupled, testable .NET code with runnable examples, service lifetimes and best practices. - [SOLID Principles in C#: Complete Guide with Code Examples](https://csharp-coder.com/2026/09/solid-principles-in-c-complete-guide.html): Learn SOLID principles in C# with real-world code examples. Master SRP, OCP, LSP, ISP and DIP in .NET — read the guide and write cleaner code today. - [ASP.NET Core SignalR Tutorial: Live Chat & Notifications](https://csharp-coder.com/2026/09/aspnet-core-signalr-tutorial-live-chat.html): Learn ASP.NET Core SignalR step by step: build real-time chat and live notifications in C# with hubs, groups, auth, and scaling. Start coding today! - [OpenTelemetry .NET Tutorial: Distributed Tracing Guide](https://csharp-coder.com/2026/09/opentelemetry-net-tutorial-distributed.html): Learn OpenTelemetry .NET step by step: set up distributed tracing, metrics, and logs in ASP.NET Core with runnable C# examples. Start tracing today! - [Clean Architecture in C#: Build Maintainable .NET Apps](https://csharp-coder.com/2026/09/clean-architecture-in-c-build.html): Learn clean architecture in C# with a practical ASP.NET Core example. Layers, dependency rule, code samples, and best practices. - [Cloud Security Best Practices 2026: AWS, Azure, GCP Guide](https://csharp-coder.com/2026/09/cloud-security-best-practices-2026-aws.html): Learn cloud security best practices for AWS, Azure, and GCP in 2026. Practical C# examples for IAM, secrets, encryption, and logging. - [ML.NET Image Classification in C#: Train & Deploy a Model](https://csharp-coder.com/2026/09/mlnet-image-classification-in-c-train.html): Learn ML.NET image classification in C#. Train a custom image classifier with transfer learning, evaluate it, and deploy it in ASP.NET Core. Start now. - [C# Async/Await Complete Guide 2026: Examples & Mistakes](https://csharp-coder.com/2026/09/c-asyncawait-complete-guide-2026.html): Master C# async await with this complete 2026 guide. Real-world examples, best practices, and common mistakes to avoid. Start writing faster async code today. - [.NET Performance Profiling: dotTrace & PerfView Guide](https://csharp-coder.com/2026/09/net-performance-profiling-dottrace.html): Learn .NET performance profiling with dotTrace and PerfView. Find CPU, memory, and async bottlenecks in C# apps — step-by-step tutorial with code. - [Fine-Tune AI Models & Call Them From C# (2026 Guide)](https://csharp-coder.com/2026/09/fine-tune-ai-models-call-them-from-c.html): Learn how to fine-tune AI models and call them from C# with OpenAI and Azure OpenAI. Step-by-step code examples inside — start building today. - [Vertical Slice Architecture in .NET: A Complete Guide](https://csharp-coder.com/2026/09/vertical-slice-architecture-in-net.html): Learn vertical slice architecture in .NET with C# examples. Organize code by feature, not layer — with MediatR, minimal APIs, and best practices. Start now! - [What Is Zero Trust Security? Architecture Guide 2026](https://csharp-coder.com/2026/09/what-is-zero-trust-security.html): Learn what zero trust security is, its core principles, architecture, and how to implement it in C# and .NET. Complete 2026 guide with code examples. - [Terraform Tutorial for .NET Developers: AWS & Azure IaC](https://csharp-coder.com/2026/09/terraform-tutorial-for-net-developers.html): Learn Terraform for .NET developers with this hands-on tutorial. Deploy ASP.NET Core apps to AWS and Azure using infrastructure as code. Start today! - [Build a Recommendation System in C# with ML.NET](https://csharp-coder.com/2026/09/build-recommendation-system-in-c-with.html): Learn how to build a recommendation system in C# using ML.NET collaborative filtering. Step-by-step tutorial with full code — start building today. - [Blazor WebAssembly Tutorial for .NET 10: Build a C# App](https://csharp-coder.com/2026/08/blazor-webassembly-tutorial-2026-build.html): Short answer: Blazor WebAssembly runs your C# in the browser on a .NET runtime compiled to WebAssembly. - [NLP with C# and ML.NET: Complete Guide with Examples](https://csharp-coder.com/2026/08/nlp-with-c-and-mlnet-complete-guide.html): Learn natural language processing in C# with ML.NET: text classification, sentiment analysis, tokenization and TF-IDF with runnable code. Start building today. - [12-Factor App with ASP.NET Core: Cloud-Native .NET Guide](https://csharp-coder.com/2026/08/12-factor-app-with-aspnet-core-cloud.html): Learn how to build cloud-native .NET apps using 12-factor app principles with ASP.NET Core. Practical C# examples, best practices, and pitfalls. Start now. - [Infrastructure as Code with C#: Pulumi .NET Tutorial](https://csharp-coder.com/2026/08/infrastructure-as-code-with-c-pulumi.html): Learn Infrastructure as Code with C# using Pulumi. Step-by-step .NET tutorial with runnable examples, best practices, and pitfalls. Start deploying today. - [Azure AI Search with C# Tutorial: Build Smart Search (2026)](https://csharp-coder.com/2026/08/azure-ai-search-with-c-tutorial-build.html): Learn Azure AI Search with C# step by step: create an index, upload documents, run full-text, semantic and vector search with the .NET SDK. - [C# Extension Methods: Write Cleaner Code (Real Examples)](https://csharp-coder.com/2026/08/c-extension-methods-write-cleaner-code.html): Learn C# extension methods with real-world examples. Write cleaner, reusable code, avoid common pitfalls, and follow best practices. Start coding today. - [ASP.NET Core Security Best Practices 2026: Protect Your App](https://csharp-coder.com/2026/08/aspnet-core-security-best-practices.html): Learn ASP.NET Core security best practices for 2026: stop XSS, CSRF, SQL injection & more with real C# code. Secure your web app today. - [GitHub Copilot in Visual Studio: C# Productivity Guide 2026](https://csharp-coder.com/2026/08/github-copilot-in-visual-studio-c.html): Learn how to use GitHub Copilot in Visual Studio for C# development. Setup, prompts, best practices, and pitfalls to code faster with AI today. - [Deploy .NET Microservices to Azure Kubernetes Service (AKS)](https://csharp-coder.com/2026/08/deploy-net-microservices-to-azure.html): Learn how to deploy .NET microservices to Azure Kubernetes Service (AKS) step by step with Docker, YAML manifests, and best practices. Start deploying today. - [GitHub Copilot for C# Developers: Tips & Best Practices 2026](https://csharp-coder.com/2026/08/github-copilot-for-c-developers-tips.html): Master GitHub Copilot for C# in 2026. Learn prompt tips, Copilot Chat tricks, .NET best practices and pitfalls to write better code faster. Start today. - [C# Primary Constructors: IDE0290, Pitfalls and Examples](https://csharp-coder.com/2026/08/c-primary-constructors-explained-with.html): Short answer: a C# primary constructor (C# 12 and later) puts the constructor parameters on the type itself: class OrderService(IOrderRepository repository). - [Azure Blob Storage C# Tutorial: Upload & Download Files](https://csharp-coder.com/2026/08/azure-blob-storage-c-tutorial-upload.html): Learn Azure Blob Storage in C# with .NET 8: upload, download, list, and delete files using the Azure.Storage.Blobs SDK. Runnable code examples inside. - [OWASP Top 10 for .NET Developers: Fix Every Risk (2026)](https://csharp-coder.com/2026/08/owasp-top-10-for-net-developers-fix.html): Learn the OWASP Top 10 for .NET developers with C# code fixes for every vulnerability — SQL injection, broken access control, and more. - [Semantic Kernel C# Tutorial: Build AI Agents Step by Step](https://csharp-coder.com/2026/08/semantic-kernel-c-tutorial-build-ai.html): Learn Microsoft Semantic Kernel in C# with this step-by-step tutorial. Build AI agents, plugins, and copilots in .NET with runnable code. Start today. - [ASP.NET Core Rate Limiting: 4 Algorithms Compared on .NET 10](https://csharp-coder.com/2026/08/aspnet-core-rate-limiting-protect-your.html): Short answer: ASP.NET Core has rate limiting built in since .NET 7. - [Event-Driven Architecture in C#: Build Loosely Coupled Apps](https://csharp-coder.com/2026/08/event-driven-architecture-in-c-build.html): Learn event-driven architecture in C# with runnable examples: C# events, MediatR, and message queues. Build loosely coupled .NET systems today. - [AWS vs Azure vs GCP for .NET Developers: Best Cloud 2026](https://csharp-coder.com/2026/08/aws-vs-azure-vs-gcp-for-net-developers_01860581701.html): AWS vs Azure vs GCP for .NET developers compared in 2026 — pricing, services, C# SDKs, and deployment. Find out which cloud is best for your .NET apps today. - [AI Code Review in C#: Automate Reviews with OpenAI & .NET](https://csharp-coder.com/2026/08/ai-code-review-in-c-automate-reviews.html): Learn AI code review in C# with practical .NET examples. Build an automated reviewer using OpenAI, GitHub Actions and Roslyn. Start improving PRs today. - [How to Prevent Data Breaches: Security Checklist for Devs](https://csharp-coder.com/2026/08/how-to-prevent-data-breaches-security.html): Learn how to prevent data breaches with a practical security checklist for software teams, including C# code examples. Secure your .NET apps today. - [AWS Lambda C# API Gateway: Build a Serverless REST API](https://csharp-coder.com/2026/08/aws-lambda-c-api-gateway-build.html): Learn how to build a serverless REST API with AWS Lambda C# and API Gateway. Step-by-step .NET 8 tutorial with runnable code. Start building today. - [Multi-Cloud Strategy for .NET Apps: AWS, Azure & GCP](https://csharp-coder.com/2026/08/multi-cloud-strategy-for-net-apps-aws_01161909866.html): Learn how to build a multi-cloud strategy for .NET apps across AWS, Azure & GCP with C# code examples, best practices, and pitfalls. Start today! - [ASP.NET Core Output Caching: Speed Up Your API Fast](https://csharp-coder.com/2026/08/aspnet-core-output-caching-speed-up.html): Learn ASP.NET Core output caching with real C# examples. Speed up API responses dramatically with policies, cache invalidation & Redis. Start caching today! - [Google Cloud Pub/Sub with C#: .NET 10 Tutorial and Gotchas](https://csharp-coder.com/2026/08/google-cloud-pubsub-with-c-complete-net.html): Short answer: Install Google.Cloud.PubSub.V1, create a topic and a subscription, publish with PublisherClient and consume with SubscriberClient.StartAsync, returning Reply.Ack or Reply.Nack from your handler. - [C# Generics Tutorial (.NET 10): Constraints and Errors](https://csharp-coder.com/2026/08/c-generics-tutorial-write-type-safe.html): Short answer: Generics let you write a class or method once with a type parameter (T) and have the compiler check every use. - [Build a RAG Chatbot in C# with Semantic Kernel (2026)](https://csharp-coder.com/2026/08/build-rag-chatbot-in-c-with-semantic.html): Learn how to build a RAG chatbot in C# using Semantic Kernel. Step-by-step tutorial with embeddings, vector search & code. Start building today! - [C# Code Review Best Practices: A Checklist for Teams](https://csharp-coder.com/2026/08/c-code-review-best-practices-checklist.html): Master C# code review best practices with a practical checklist, real code examples, and tips to catch bugs early. Level up your .NET team today. - [Build an AI Chatbot with C# and OpenAI API (2026 Guide)](https://csharp-coder.com/2026/08/build-ai-chatbot-with-c-and-openai-api.html): Learn how to build an AI chatbot in C# with the OpenAI API. Step-by-step .NET 8 tutorial with streaming, history & function calling. Start coding now! - [Cybersecurity Career Roadmap 2026: A Developer's Guide](https://csharp-coder.com/2026/08/cybersecurity-career-roadmap-2026.html): Follow this cybersecurity career roadmap for 2026 to move from developer to security engineer — skills, certifications, and salaries. Start today! - [Hangfire vs Quartz.NET vs BackgroundService in .NET 10](https://csharp-coder.com/2026/08/hangfire-vs-quartznet-vs-ihostedservice.html): Short answer: use BackgroundService for continuous loops such as queue consumers and outbox processors. - [Generative AI in .NET: Architecture Patterns for C# Apps](https://csharp-coder.com/2026/07/generative-ai-in-net-architecture.html): Learn generative AI in .NET with proven enterprise patterns — RAG, Semantic Kernel, streaming, and resilience in C#. Start building smarter apps today. - [C# Collections Performance: List vs Dictionary vs HashSet](https://csharp-coder.com/2026/07/c-collections-performance-list-vs.html): Master C# collections performance: List vs Dictionary vs HashSet vs Queue with Big-O tables, real benchmarks, and code examples. Pick the right one today. - [How to Dockerize an ASP.NET Core App in .NET 9](https://csharp-coder.com/2026/07/how-to-dockerize-aspnet-core-app-in-net.html): Learn how to dockerize an ASP.NET Core app in .NET 9 with a step-by-step Dockerfile tutorial, best practices, and deployment tips. Start containerizing today! - [Prevent XSS in ASP.NET Core: Complete Security Guide](https://csharp-coder.com/2026/07/prevent-xss-in-aspnet-core-complete.html): Learn how to prevent cross-site scripting (XSS) in ASP.NET Core with encoding, CSP, and sanitization. Complete guide with C# code examples — read now. - [Repository and Unit of Work Pattern in C# with EF Core](https://csharp-coder.com/2026/07/repository-and-unit-of-work-pattern-in.html): Short answer: the Unit of Work pattern groups several changes into one commit so they all succeed or all fail, and the Repository pattern hides how entities are loaded and saved behind an interface. - [Azure Service Bus with C#: Complete Tutorial (2026)](https://csharp-coder.com/2026/07/azure-service-bus-with-c-complete.html): Learn Azure Service Bus with C# in this hands-on tutorial. Master queues, topics, and event-driven architecture with runnable .NET code examples. Start now! - [C# Pattern Matching: Complete Guide with Examples (2026)](https://csharp-coder.com/2026/07/c-pattern-matching-complete-guide-with.html): Learn C# pattern matching with this complete guide covering switch expressions, property patterns & list patterns. - [SQL Injection Prevention in C#: Complete Security Guide](https://csharp-coder.com/2026/07/sql-injection-prevention-in-c-complete.html): Learn SQL injection prevention in C# with parameterized queries, EF Core, and stored procedures. Secure your .NET database code today with proven examples. - [TDD in C# with xUnit and Moq: A Practical Guide](https://csharp-coder.com/2026/06/tdd-in-c-with-xunit-and-moq-practical.html): Learn TDD in C# using xUnit and Moq. Write tests first, code second with step-by-step examples and best practices. Start building better software today. - [ASP.NET Core Health Checks on .NET 10: Setup and Gotchas](https://csharp-coder.com/2026/06/aspnet-core-health-checks-complete.html): Short answer: call builder.Services.AddHealthChecks(), chain one check per dependency, and expose it with app.MapHealthChecks("/health"). - [Deploy ASP.NET Core to Azure App Service in 10 Minutes](https://csharp-coder.com/2026/06/deploy-aspnet-core-to-azure-app-service.html): Learn how to deploy ASP.NET Core to Azure App Service step by step. Follow this guide with CLI, Visual Studio & GitHub Actions examples. Start deploying now! - [ML.NET Tutorial: Build Your First ML Model in C#](https://csharp-coder.com/2026/06/mlnet-tutorial-build-your-first-ml.html): Learn ML.NET with this step-by-step C# tutorial. Build, train, and deploy your first machine learning model in .NET with practical code examples. - [C# Source Generators on .NET 10: Tutorial and Common Errors](https://csharp-coder.com/2026/06/c-source-generators-tutorial-automate.html): Short answer: a C# source generator is a class that runs inside the compiler and adds C# files to your build. - [C# 14 and C# 13 New Features: Examples and Breaking Changes](https://csharp-coder.com/2026/06/c-13-new-features-complete-guide-with.html): Short answer: C# 13 shipped with .NET 9 and added params collections (params ReadOnlySpan and friends), the System.Threading.Lock type, partial properties and indexers, the \e escape, ^ indexes in object initializers, ref locals in async methods and iterators, the allows ref struct anti-constraint and [OverloadResolutionPriority]. - [C# Design Patterns Tutorial: Factory, Singleton & More](https://csharp-coder.com/2026/06/c-design-patterns-tutorial-factory.html): Learn the most important C# design patterns with real code examples. Master Factory, Singleton, Observer, and Strategy patterns step by step. - [Ransomware Protection for Developers: Secure Your Code](https://csharp-coder.com/2026/06/ransomware-protection-for-developers.html): Learn ransomware protection best practices for developers. Secure your C# apps and data with proven coding techniques and prevention strategies. - [Azure OpenAI C# Tutorial: Integrate GPT-4o in .NET](https://csharp-coder.com/2026/06/azure-openai-c-tutorial-integrate-gpt_02088317606.html): Learn how to use Azure OpenAI in C# with practical code examples. Integrate GPT-4o into your .NET app with streaming, function calling, and best practices. - [Azure AI Document Intelligence C# Tutorial (SDK 1.0 GA)](https://csharp-coder.com/2026/06/azure-ai-document-intelligence-c.html): Short answer: install Azure.AI.DocumentIntelligence, create a DocumentIntelligenceClient with your endpoint and key (or DefaultAzureCredential), and call AnalyzeDocumentAsync(WaitUntil.Completed, "prebuilt-invoice", uri). - [CQRS with MediatR in ASP.NET Core: A Working Example](https://csharp-coder.com/2026/06/cqrs-with-mediatr-in-aspnet-core-full.html): Short answer: CQRS splits your application code into commands that change state and queries that only read it. - [Azure Functions C# Tutorial: Build & Deploy Step by Step](https://csharp-coder.com/2026/06/azure-functions-c-tutorial-build-deploy.html): Learn Azure Functions with C# in this step-by-step tutorial. Build, test, and deploy serverless functions with practical code examples. - [Entity Framework Core 9 Tutorial: Migrations & Performance](https://csharp-coder.com/2026/06/entity-framework-core-9-tutorial.html): Learn Entity Framework Core 9 with migrations, relationships, and performance tips. Practical C# examples and best practices for EF Core developers. - [DevSecOps in C#: Secure Your CI/CD Pipeline in 2026](https://csharp-coder.com/2026/06/devsecops-in-c-secure-your-cicd.html): Learn DevSecOps best practices for C# and .NET. Build security into your CI/CD pipeline from day one with practical code examples and automation tools. - [Vector Database C# Guide: Qdrant, Pinecone, Weaviate](https://csharp-coder.com/2026/06/vector-database-c-guide-qdrant-pinecone.html): Learn how to use vector databases in C# with Qdrant, Pinecone, and Weaviate. Step-by-step integration guide with code examples for semantic search and RAG. - [AWS CloudFormation with C#: Tutorial & Examples](https://csharp-coder.com/2026/06/aws-cloudformation-with-c-tutorial.html): Learn AWS CloudFormation with C# to automate cloud infrastructure. Step-by-step tutorial with code examples using AWS CDK and SDK for .NET. - [Encryption in C#: AES, RSA & Hashing Complete Guide](https://csharp-coder.com/2026/06/encryption-in-c-aes-rsa-hashing.html): Learn encryption in C# with AES, RSA, and hashing. Complete developer guide with runnable code examples, best practices, and security pitfalls. - [Domain-Driven Design in C#: Tactical Patterns Guide](https://csharp-coder.com/2026/06/domain-driven-design-in-c-tactical.html): Learn Domain-Driven Design in C# with practical tactical patterns—entities, value objects, aggregates, and repositories. Start writing cleaner code today. - [Blazor Server vs WebAssembly vs United: 2026 Guide](https://csharp-coder.com/2026/06/blazor-server-vs-webassembly-vs-united.html): Blazor Server vs WebAssembly comparison for 2026. Learn hosting models, performance, and when to use Blazor United. Start choosing the right one today. - [C# Frozen Collections: High-Performance Immutable Guide](https://csharp-coder.com/2026/06/c-frozen-collections-high-performance.html): Learn C# frozen collections (FrozenDictionary & FrozenSet) for blazing-fast lookups. - [C# Records vs Classes vs Structs: When to Use Each (2026)](https://csharp-coder.com/2026/06/c-records-vs-classes-vs-structs-when-to.html): Learn C# records vs classes vs structs with real examples. Master when to use each type in 2026 with best practices, pitfalls, and performance tips. Start now! - [AWS DynamoDB with C#: A Complete .NET Tutorial (2026)](https://csharp-coder.com/2026/06/aws-dynamodb-with-c-complete-net.html): Learn how to use AWS DynamoDB with C# in .NET. Step-by-step tutorial with code examples, best practices, and serverless tips. Start building today! - [Enforce HTTPS in ASP.NET Core: Redirects, HSTS and Proxies](https://csharp-coder.com/2026/06/aspnet-core-https-enforce-ssl-secure.html): Short answer: to enforce HTTPS in ASP.NET Core, call app.UseHttpsRedirection() and, outside Development, app.UseHsts(). - [.NET MAUI Tutorial 2026: Build Cross-Platform Apps in C#](https://csharp-coder.com/2026/06/net-maui-tutorial-2026-build-cross.html): Learn .NET MAUI in 2026 to build iOS, Android, Windows & Mac apps from one C# codebase. Start this cross-platform tutorial with code examples today. - [Authentication vs Authorization in ASP.NET Core Guide](https://csharp-coder.com/2026/06/authentication-vs-authorization-in.html): Learn authentication vs authorization in ASP.NET Core with practical C# code, JWT, and policy examples. Secure your .NET apps the right way—start now. - [Local AI with Ollama and C#: Run LLMs Free in 2026](https://csharp-coder.com/2026/06/local-ai-with-ollama-and-c-run-llms.html): Learn how to run local AI with Ollama and C#. Set up free local LLMs on your own machine with runnable code examples. Start building offline AI apps today. - [API Versioning in ASP.NET Core: Asp.Versioning on .NET 10](https://csharp-coder.com/2026/06/api-versioning-in-aspnet-core-complete_01338911519.html): Short answer: API versioning in ASP.NET Core uses the Asp.Versioning.* NuGet packages. They replace Microsoft.AspNetCore.Mvc.Versioning, which is deprecated. - [C# Delegates, Events and Func/Action: Complete Guide](https://csharp-coder.com/2026/06/c-delegates-events-and-funcaction.html): Learn C# delegates, events, and Func/Action with practical examples. Master event-driven programming in C# the right way — start coding today! - [Azure DevOps Pipelines for .NET: CI/CD Tutorial](https://csharp-coder.com/2026/06/azure-devops-pipelines-for-net-cicd.html): Learn how to build Azure DevOps pipelines for .NET CI/CD. Step-by-step YAML tutorial to deploy your C# app to Azure automatically. Start now! ## Pages - [Tested C# and .NET Tutorials](https://csharp-coder.com/): Tested C# and .NET tutorials by Rajni Kavathiya. - [AI in .NET Tutorials: LLMs, Agents, RAG and ML.NET](https://csharp-coder.com/ai-dotnet-tutorials): Every AI and machine learning article on this site for C# and .NET developers: calling large language models from C#, building agents and RAG chatbots, running models locally, training your own with ML.NET and TorchSharp, and AI tools for writing and reviewing C# code. - [Cloud and Security Tutorials for .NET: Azure, AWS, GCP](https://csharp-coder.com/cloud-tutorials): Every cloud, infrastructure and security article on this site for .NET developers: Azure, AWS and Google Cloud services from C#, serverless, infrastructure as code, and securing the code and the pipeline. - [ASP.NET Core Tutorials: APIs, Security and Deployment](https://csharp-coder.com/aspnet-core-tutorials): Every ASP.NET Core article on this site, grouped by the job you are doing: building an API, keeping it running, securing it, structuring it and shipping it. - [C# Tutorials: Language Features, Patterns and Performance](https://csharp-coder.com/csharp-tutorials): Every C# language article on this site in one place: what changed in recent versions, the core features you use daily, writing fast code, design patterns, testing, and writing secure code. - [Privacy Policy](https://csharp-coder.com/privacy-policy): One of our top priorities, which can be found at, is the privacy of our visitors. - [About Us](https://csharp-coder.com/about-us): CSharp Coder publishes practical C# and .NET articles: language features, ASP.NET Core APIs, EF Core, performance, Azure and AI in .NET. [comment]: # (Generated by Hostinger Tools Plugin)