Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
153 posts found #backend
Strings in C#: Interpolation, StringBuilder and the Turkish I Trap
Backend PART 05

Strings in C#: Interpolation, StringBuilder and the Turkish I Trap

Immutability of strings in C#, interpolation and format specifiers, escape sequences and verbatim strings, commonly used methods, the measured memory difference with StringBuilder, StringComparison and the Turkish I/ı/İ trap.

7 Nov 2026 8 min 10
Numbers and Arithmetic in C#: int, double, decimal and Overflow
Backend PART 04

Numbers and Arithmetic in C#: int, double, decimal and Overflow

Integer division and the remainder in C#, choosing between int, long, double and decimal, why 0.1 + 0.2 isn't 0.3, decimal for money, overflow and checked, dividing by zero, the Math class and the banker's rounding trap.

7 Nov 2026 8 min 8
Variables and Data Types in C#: var, const and Literals
Backend PART 03

Variables and Data Types in C#: var, const and Literals

Statically typed variables in C#, the sizes and ranges of the built-in types, what var really does, literal suffixes and the compiler errors around them, const and C# 10's constant interpolated strings, default values and .NET naming conventions.

7 Nov 2026 9 min 11
Installing C# and Your First Program: dotnet new console and the Project File
Backend PART 02

Installing C# and Your First Program: dotnet new console and the Project File

Installing the .NET 10 SDK, the first project with dotnet new console, top-level statements and the Main the compiler generates, TargetFramework, ImplicitUsings, Nullable and LangVersion in the csproj, dotnet run and build, choosing an IDE, and reading your first compiler error.

7 Nov 2026 8 min 7
What Are C# and .NET? Language, Platform and Versions
Backend PART 01

What Are C# and .NET? Language, Platform and Versions

The line between C# and .NET: the compiler, IL and JIT, the CLR, the BCL, SDK versus runtime, the move from .NET Framework to .NET, the LTS/STS support calendar, how C# and .NET versions pair up, and the plan for the seven-series C# family.

7 Nov 2026 9 min 9
Dapper.AOT: Dapper with Source Generators, Interceptors and Native AOT
Database PART 16

Dapper.AOT: Dapper with Source Generators, Interceptors and Native AOT

Why does vanilla Dapper blow up even under dotnet run once PublishAot is on? Generating the code at build time with Dapper.AOT 1.1.0: [module: DapperAot], InterceptorsNamespaces, the generated interceptor code, Native AOT publish and a startup time going from 49.8 ms to 4.3 ms, type handlers as attributes, the DAP analyzers and limitations such as QueryMultiple.

6 Nov 2026 10 min 18
Dapper Performance: Query Cache, GetRowParser and Bulk Alternatives with SqlBulkCopy and COPY
Database PART 15

Dapper Performance: Query Cache, GetRowParser and Bulk Alternatives with SqlBulkCopy and COPY

What Dapper's query cache holds and why it draws a saw blade, when CommandFlags.NoCache is needed, choosing a type per row with GetRowParser, and for the bulk operations Dapper lacks: a transaction on SQLite, SqlBulkCopy on SQL Server and COPY on PostgreSQL, all with real measurements, closing with BenchmarkDotNet.

6 Nov 2026 11 min 15
Dynamic SQL with Dapper: SqlBuilder, Safe Filters and Contrib, Dommel, Dapper Plus
Database PART 14

Dynamic SQL with Dapper: SqlBuilder, Safe Filters and Contrib, Dommel, Dapper Plus

Building optional filters without string concatenation: Dapper.SqlBuilder's templates and placeholders, count and page queries from one builder, safe sorting with a whitelist and the OrWhere surprise. Then a balanced look at Dapper.Contrib, Rainbow, Dommel and the commercial Dapper Plus as of November 2026.

6 Nov 2026 10 min 16
Dapper and SQL Server: TVPs, ANSI Strings, {=literal} and Parameter Sniffing
Database PART 13

Dapper and SQL Server: TVPs, ANSI Strings, {=literal} and Parameter Sniffing

Queries that return the right result but scan the whole index: the implicit conversion nvarchar parameters cause on varchar columns, Dapper's 4000-character rule, IN lists multiplying plans, table-valued parameters, filtered indexes with {=literal} and parameter sniffing, all with real logical-reads measurements.

6 Nov 2026 11 min 20
Stored Procedures with Dapper: Output, Return Value and the Auto-Detection Trap of 2.1.11
Database PART 12

Stored Procedures with Dapper: Output, Return Value and the Auto-Detection Trap of 2.1.11

SQLite has no stored procedures, so we move to SQL Server in docker: CommandType.StoredProcedure, output and return values with DynamicParameters, how SET NOCOUNT affects Execute, single-word commands mistaken for procedures since 2.1.11, and the function vs procedure difference in PostgreSQL.

6 Nov 2026 10 min 13
Type Handlers and Custom Mapping in Dapper: Guid, DateTimeOffset and CustomPropertyTypeMap
Database PART 11

Type Handlers and Custom Mapping in Dapper: Guid, DateTimeOffset and CustomPropertyTypeMap

Why does Dapper blow up when reading Guid, DateTimeOffset and TimeSpan on SQLite? We write interpreters with SqlMapper.TypeHandler<T>, see from the source why SetValue is never called, and cover the DateOnly/TimeOnly story of 2.1.86 and column mapping with CustomPropertyTypeMap.

6 Nov 2026 11 min 15
Buffered and Unbuffered Reads in Dapper: Streaming Large Result Sets
Database PART 10

Buffered and Unbuffered Reads in Dapper: Streaming Large Result Sets

We measure the difference between buffered and unbuffered reads in Dapper: an unbuffered result re-running the query on every enumeration, 191 MB versus near-zero memory on a million rows, IAsyncEnumerable streaming with QueryUnbufferedAsync, cancellation with WithCancellation and the disposed-connection trap, all with real output.

6 Nov 2026 9 min 10
Blog Map