Results for “C#”
21 result(s) in everything
-
Blog
Types of SQL Server Joins with Examples
INNER, LEFT, RIGHT, FULL OUTER, CROSS, and self joins explained on one dataset with real results — including the anti-join pattern and the WHERE-vs-ON trap that breaks LEFT JOINs.
-
Blog
AutoMapper in ASP.NET Core Web API — and the Modern Alternatives
AutoMapper usage in ASP.NET Core Web API, its 2025 commercial licensing change, and the modern alternatives — hand-written mapping extension methods and the Mapperly source generator.
-
Blog
How to Pivot Data in SQL Server
Rotate rows into columns with PIVOT, the CASE alternative for multiple aggregates, dynamic pivots with STRING_AGG and sp_executesql, and UNPIVOT (plus CROSS APPLY VALUES) for the reverse.
-
Blog
Using Fluent API in EF Core Code First
EF Core Fluent API configuration in OnModelCreating — tables, columns, keys, indexes, relationships, query filters, value conversions, and when to prefer it over DataAnnotations.
-
Blog
User-Defined Functions in SQL Server
Scalar, inline table-valued, and multi-statement functions with real outputs — why inline TVFs optimize like views, when scalar UDFs go per-row, and why MSTVFs are a last resort.
-
Blog
AJAX Calls with JsonResult in ASP.NET Core MVC — fetch and jQuery
Return JSON from ASP.NET Core MVC actions and call them from the browser — the fetch API for modern pages, jQuery $.ajax for legacy ones, POSTing JSON with FromBody, and common pitfalls.
-
Blog
CROSS APPLY and OUTER APPLY in SQL Server with Examples
Per-row table expressions: top-N-per-group queries, passing row values into table-valued functions, APPLY (VALUES) for named expressions, and when plain JOIN is all you need.
-
Blog
Create and Connect an Azure Linux VM with an SSH Key Pair
Create an SSH key pair with ssh-keygen, provision an Azure Ubuntu VM that accepts only that key using the Azure CLI, connect, and harden access — with cleanup commands.
-
Blog
SQL Server Common Table Expressions with Examples
CTEs from basics to recursion — readable query pipelines, the top-N-per-group idiom with window functions, chained CTEs, writable CTEs for dedup, and walking hierarchies of any depth.
-
Blog
How to Export SQL Server Data to Excel in C# (Without Office Interop)
Export SQL Server query results to Excel with ClosedXML — no Office installation, no COM Interop, safe on servers and containers, with styling and a Web API download endpoint.
-
Blog
How to Bind a DropDownList in ASP.NET Core MVC
Bind selects with the select tag helper: model-bound options, enum dropdowns, required validation, and cascading dropdowns using a JSON action and fetch.
-
Blog
Entity Framework Core Database-First Tutorial
Scaffold a DbContext and entities from an existing SQL Server database with dotnet ef dbcontext scaffold — what gets generated, re-scaffolding on schema changes, and extending via partial classes.
-
Blog
EF Core Code First Migrations with DataAnnotations Attributes
Shape your SQL Server schema with DataAnnotations — Table, Column, Key, Required, MaxLength, Index, Timestamp, ConcurrencyCheck — and apply it with EF Core migrations, verified against a real database
-
Blog
Create an Azure VM using C# and Azure.ResourceManager
Provision a complete Azure Linux VM from C# with the modern Azure.ResourceManager SDK — DefaultAzureCredential auth, VNet, public IP, NIC, SSH-key login, and a migration map from the deprecated Fluent
-
Blog
Cascading Dropdowns with JsonResult in ASP.NET Core
Build cascading dropdowns in ASP.NET Core — a JsonResult action per level, the fetch API on the change event, safe option rendering, and a jQuery version for older projects.
-
Blog
Implement Repository Pattern with ASP.NET Core Web API
Implement the Repository Pattern with ASP.NET Core Web API on .NET 10 — EF Core 10, DTO mapping with extension methods, async CRUD operations, and the built-in OpenAPI support with Scalar.
-
Blog
SQL Server Temporary Table vs Table Variable
Statistics, indexing, scope, and rollback behavior compared with runnable examples — why table variables wreck big-join plans and where they genuinely win.
-
Blog
SQL Server Constraints with Examples
All six constraint types on one table — PRIMARY KEY, UNIQUE, CHECK, DEFAULT, FOREIGN KEY, NOT NULL — each violated on purpose so you see the real errors, plus naming and FK-index guidance.
-
Blog
How to Implement Dependency Injection in .NET Core
Learn dependency injection in .NET with the built-in IoC container — register services in Program.cs, inject them through constructors, choose lifetimes, and swap implementations with one line.
-
Blog
Getting Started with ASP.NET Core Web API and Entity Framework
Build your first ASP.NET Core Web API on .NET 10 with Entity Framework Core — scaffold models from SQL Server, add an async controller, and test with the built-in OpenAPI document and Scalar.
-
Blog
Get Azure Subscription, Tenant, Client ID and Client Secret
Find your Azure subscription ID and Microsoft Entra tenant ID, register an app for a client ID and secret, assign RBAC roles, and wire all four into DefaultAzureCredential.