//JorgenHoc

All Articles

25 articles on .NET development and cloud hosting

EF Core

Caching EF Core Queries with HybridCache in .NET 10

Cache EF Core query results with .NET 10's HybridCache: stampede protection, tag-based invalidation, and optional Redis L2 — with measured SQL statement counts.

Sep 4, 202610 min read
.NET Hosting

Cheapest Way to Host a .NET App in 2026

Find the cheapest .NET hosting in 2026: free tiers, $5–$10/month options, and what you actually give up. Covers Railway, Fly.io, Render, Oracle Cloud, and Azure.

Mar 14, 202520 min read
Async C#

Async Exception Handling in C# — The Complete Guide

Handle exceptions in async C# code: try/catch with await, AggregateException from Task.WhenAll, async void pitfalls, exception filters, and global unobserved task handlers.

Mar 12, 202522 min read
EF Core

EF Core vs Dapper — Which ORM Should You Use?

Compare EF Core and Dapper on performance, query control, migrations, and productivity. Includes benchmarks, side-by-side code, and a decision matrix.

Mar 10, 202518 min read
.NET Hosting

.NET Docker Container — Production-Ready Dockerfile

Build production-grade Docker images for .NET 10 apps: multi-stage builds, non-root users, health checks, layer caching, image size comparison, and docker-compose for local dev.

Mar 7, 202515 min read
Async C#

IAsyncEnumerable<T> in C# — Streaming Data the Right Way

Use IAsyncEnumerable<T> to stream data without loading everything into memory: async iterators, EF Core streaming, ASP.NET Core streaming responses, and cancellation.

Mar 5, 202516 min read
EF Core

EF Core Global Query Filters — Soft Delete and Multi-Tenancy

Implement soft delete, multi-tenancy, and row-level security in EF Core using global query filters. Covers filter setup, bypassing, indexes, and testing.

Mar 3, 202519 min read
.NET Hosting

.NET on Render.com — Pros, Cons, and Real Benchmark

Host your .NET 10 app on Render.com: setup guide, render.yaml config, cold start problem, pricing breakdown, and a benchmark comparison against Railway and Fly.io.

Feb 28, 202517 min read
Async C#

ConfigureAwait(false) in C# — The Complete Explanation

Understand exactly what ConfigureAwait(false) does — measured in SynchronizationContext.Post calls — when you need it, when you can skip it, and the .NET 8 ConfigureAwaitOptions overload.

Feb 26, 202516 min read
EF Core

EF Core Performance: Solving the N+1 Query Problem

Identify and fix the N+1 query problem in EF Core using eager loading, split queries, projection, and query logging. Includes real SQL output comparisons.

Feb 24, 202516 min read
.NET Hosting

Hosting a .NET API on Fly.io — Step by Step

Deploy your .NET API to Fly.io: Dockerfile, fly.toml config, flyctl commands, secrets management, Postgres addon, custom domains, pricing, and honest pros and cons.

Feb 21, 202516 min read
Async C#

CancellationToken in C# — Practical Patterns

CancellationToken in C# with every claim asserted by a runnable sample: cooperative cancellation, timeout vs caller-cancel detection, linked tokens, Register semantics, and graceful shutdown in ASP.NET Core.

Feb 19, 202518 min read
EF Core

EF Core Raw SQL Queries — When and How to Use Them

Learn when raw SQL beats LINQ in EF Core, how to use FromSqlRaw, FromSqlInterpolated, and ExecuteSqlRaw safely, and how to prevent SQL injection with parameterization.

Feb 17, 202510 min read
.NET Hosting

AWS Elastic Beanstalk vs Azure App Service for .NET

Side-by-side comparison of AWS Elastic Beanstalk and Azure App Service for .NET workloads: setup, pricing, scaling, runtime support, CI/CD, monitoring, and a clear verdict.

Feb 14, 20259 min read
Async C#

ValueTask vs Task in C# — Performance Deep Dive

A thorough comparison of ValueTask and Task in C#: heap allocation differences, when ValueTask genuinely improves performance, benchmarks, and when to stick with Task.

Feb 12, 202513 min read
EF Core

EF Core Many-to-Many Relationships in .NET 8

Complete guide to EF Core many-to-many relationships: implicit junction tables, explicit join entities, querying through collections, and adding or removing items with EF Core 8.

Feb 10, 202511 min read
.NET Hosting

Deploy a .NET App to Railway in 10 Minutes

Step-by-step guide to deploying a .NET 10 app on Railway: Dockerfile setup, railway.json config, monorepo root directory, environment variables, custom domains, Railway CLI, pricing, and honest pros and cons.

Feb 7, 20259 min read
Async C#

How to Avoid Async Deadlocks in C#

Understand why async deadlocks happen in C# with .Result and .Wait(), how SynchronizationContext causes them, and the patterns that prevent them entirely.

Feb 5, 20259 min read
EF Core

EF Core One-to-Many Relationships — The Complete Explanation

Master EF Core one-to-many relationships: navigation properties, foreign keys, Fluent API configuration, eager/lazy/explicit loading, and cascade delete options.

Feb 3, 202510 min read
.NET Hosting

Azure App Service for .NET — Setup, Pricing & Configuration

Step-by-step guide to deploying .NET 10 apps on Azure App Service: CLI setup, pricing tiers, deployment slots, environment variables, scaling, and GitHub Actions CI/CD.

Jan 24, 202511 min read
Async C#

async/await vs Task.Run in C# — When to Use Which

Understand the critical difference between async/await for I/O-bound work and Task.Run for CPU-bound work in C#, with practical examples and common mistakes to avoid.

Jan 22, 20259 min read
EF Core

EF Core Migrations: The Definitive Walkthrough

A complete walkthrough of EF Core migrations: adding, understanding, applying, rolling back, squashing, and safely deploying migrations to production databases.

Jan 20, 202510 min read
Async C#Pillar Guide

C# async/await Complete Guide — Task, ValueTask, ConfigureAwait

Master C# async/await from first principles: Task, Task<T>, ValueTask, ConfigureAwait(false), common pitfalls, and error handling with practical runnable examples.

Jan 17, 202516 min read
EF CorePillar Guide

Entity Framework Core Complete Guide — Setup, Queries, Migrations

Everything you need to get started with Entity Framework Core: installation, DbContext, entities, migrations, CRUD, LINQ queries, and relationships — with runnable code examples verified on EF Core 10.

Jan 16, 202517 min read
.NET HostingPillar Guide

Best .NET Hosting in 2026 — Full Comparison (Azure, AWS, Railway, Fly.io)

A thorough comparison of the top .NET hosting platforms in 2026, including Azure, AWS, Railway, Fly.io, Render, and DigitalOcean — with pricing, DX, and a recommendation matrix.

Jan 15, 202516 min read