Results for “C#”
30 result(s) in everything
-
Blog
Types of SQL Server Joins with Examples
A join in SQL Server combines rows from two or more tables based on a related column. The type of join decides which rows survive: an INNER JOIN keeps only…
-
Blog
Entity Framework Core Database-First Tutorial
Database-first in EF Core means you point a tool at an existing SQL Server database and it generates the entity classes and DbContext for you, instead of you…
-
Blog
Azure for .NET Developers — Part 7: Create and Automate VMs with the Azure SDK
The modern Azure.ResourceManager SDK end to end: resource group, network, and a Linux VM with SSH keys from C#, plus scheduled start/stop to keep the bill sane.
-
Blog
Render a Partial View with a Model in ASP.NET Core MVC
To render a partial view with a strongly-typed model in ASP.NET Core MVC, use the <partial tag helper and pass the model through its model attribute:…
-
Blog
Python for .NET Developers: A Practical First Project
Coming from C#? Learn Python by building a small REST API with FastAPI — virtual environments demystified, Pydantic as your model binding, and a side-by-side C# to Python cheat sheet.
-
Blog
Modern .NET Backend Roadmap — Part 8: CI/CD with GitHub Actions
Automate build, smoke test, image, and deployment with GitHub Actions: SHA-tagged images, OIDC federation to Azure, environments with approvals, and pipeline hygiene.
-
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
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
RESTful CRUD Operations with ASP.NET Core Minimal APIs
To build a RESTful CRUD API in ASP.NET Core, model each entity as a resource, map the four HTTP verbs (GET, POST, PUT, DELETE) to read/create/update/delete,…
-
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
How to Implement Dependency Injection in .NET Core
To implement dependency injection in .NET Core, register your services in the built-in container (IServiceCollection) with a lifetime, then declare each…
-
Blog
OUTER APPLY and CROSS 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
Run MongoDB in Docker and Connect from .NET
Skip the MongoDB installer — one docker run gives you a working database. From there the .NET driver takes over: documents, queries, atomic updates, transactions, and the small traps that catch you on the first try.
-
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
Azure for .NET Developers — Part 5: Blob Storage, Queues, and SAS Tokens That Expire Properly
BlobServiceClient with DefaultAzureCredential, access tiers and lifecycle rules, and user-delegation SAS links that expire in minutes instead of account keys that never do.
-
Blog
WCF Test Client: How to Test WCF Services with WcfTestClient.exe
Find, launch, and use WCF Test Client: add a service by WSDL, invoke operations with complex parameters, read the SOAP XML, fix the classic quota errors, and know its limits.
-
Blog
Modern .NET Backend Roadmap — Part 6: Docker
Package the API as a container: multi-stage Dockerfile, layer-cache-friendly restore, non-root user, and the two real build failures you will hit — verified with a running container.
-
Blog
Modern .NET Backend Roadmap — Part 3: Dapper for Fast Reads
Add a Dapper read path beside EF Core: read models behind a port, parameterized SQL, mapping gotchas we actually hit, and when each tool wins.
-
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
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
IDisposable, Finalizers and the Dispose Pattern in .NET
Deterministic cleanup in .NET means releasing a resource the moment you are done with it, instead of waiting for the garbage collector. You get it by…
-
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
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
Convert a DataTable to CSV, List or JSON in .NET
To convert an ADO.NET DataTable to CSV, a strongly-typed List<T, or a JSON string in .NET 9, iterate the table's columns and rows with a StringBuilder for…
-
Blog
Bulk Upload into SQL Server using SqlBulkCopy and C#
Load 100,000 rows in under a second with SqlBulkCopy: column mappings, batch sizes, transactions, staging tables, and the constraint fine print — measured for real.
-
Blog
Access SQL Server from a .NET Console Application
Connect to SQL Server from a .NET 10 console app with Microsoft.Data.SqlClient: connections, parameterized commands, data readers, transactions, and where Dapper and EF Core fit.
-
Blog
Azure for .NET Developers — Part 2: Deploy an ASP.NET Core App to App Service the Right Way
az webapp up, GitHub Actions, Key Vault configuration references, deployment slots for zero-downtime swaps, and the gotchas that break first deployments.
-
Blog
.NET Dependency Injection Object Lifetimes
The built-in .NET dependency injection container ships three service lifetimes: Transient (a new instance on every resolution), Scoped (one instance per…
-
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.