Skip to main content

Posts

Showing posts with the label SQL injection prevention in C#

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

SQL Injection Prevention in C#: Complete Security Guide

Learn SQL injection prevention in C# with parameterized queries, EF Core, and stored procedures. Secure your .NET database code today with proven examples. SQL injection remains one of the most dangerous and most common vulnerabilities in web applications today. If your C# application builds SQL queries by concatenating user input, it is almost certainly exploitable. In this guide on SQL injection prevention in C# , you will learn exactly how these attacks work, why they succeed, and how to secure your database queries completely using parameterized queries, Entity Framework Core, and stored procedures. Whether you are a beginner writing your first data-access layer or a senior engineer hardening a production system, this tutorial gives you practical, runnable examples you can apply immediately. What Is SQL Injection and Why It Still Matters in 2026 SQL injection (SQLi) is an attack where a malicious user inserts SQL code into an input field, tricking your application into execu...