Mert Özen Go Beyond the Code

Blog

Posts and series that take software and IT from the basics to advanced topics: from programming languages and databases to architecture and AI.

Series
1990 posts found
Audit Trail: Who Changed What, When and Why?
Software Design PART 07

Audit Trail: Who Changed What, When and Why?

For a reliable audit trail, write changes with a SaveChangesInterceptor as per-property old/new values plus user, correlation id and reason, in the same transaction as the business data; mask personal data and make the table append-only. Cover paths that bypass the interceptor, such as ExecuteUpdate, with summary entries and a temporal table safety net.

7 Nov 2026 14 min 74
Doing Soft Delete Right: IsDeleted, DeletedAt, Filtered Unique Indexes and Archive Tables
Software Design PART 06

Doing Soft Delete Right: IsDeleted, DeletedAt, Filtered Unique Indexes and Archive Tables

To do soft delete right, filter unique indexes with WHERE DeletedAt IS NULL, link records deleted in the same operation with a DeletionId, and answer KVKK/GDPR erasure requests with anonymization rather than soft delete. If restore isn't a real requirement, an archive table or hard delete plus audit is the simpler choice.

7 Nov 2026 15 min 80
Enum or Lookup Table? Keeping Reference Data in Code and in the Database
Software Design PART 05

Enum or Lookup Table? Keeping Reference Data in Code and in the Database

Closed lists that drive code behavior (order status) should stay enums with a database mirror seeded via HasData and linked by an FK, while open lists managed by the business (the budget category on institutional orders) should live in a lookup table with IsActive and change without a deploy. The post shows the renumbering and string-enum rename traps with real output.

7 Nov 2026 13 min 69
Exposing Ids: int Identity, GUID v7 and the Public Id Split
Software Design PART 04

Exposing Ids: int Identity, GUID v7 and the Public Id Split

The most balanced way to expose an id is a bigint identity as the internal clustered key, an immutable unique PublicId outside, and an ownership condition in every query. In our measurement Guid.CreateVersion7 fragmented as badly as v4 in SQL Server (99 percent, 3,496 pages), because SQL Server sorts uniqueidentifier by its last 6 bytes; EF Core's sequential generator stayed close to identity.

7 Nov 2026 13 min 86
Sentinel Values: The Hidden Cost of 0, -1, "1900-01-01" and 9999-12-31
Software Design PART 03

Sentinel Values: The Hidden Cost of 0, -1, "1900-01-01" and 9999-12-31

Sentinel values (0 in a spending limit, 9999-12-31 in an end date, 1900-01-01 in a date) silently corrupt aggregates: in Bookstore's institutional ordering example the average limit comes out as 51,000 instead of 85,000. The fix is usually a nullable column, a separate state field when absence has several meanings and a Special Case type in the domain; a sentinel can be a deliberate standard only when a single producer owns it (temporal tables, a persisted computed column).

7 Nov 2026 15 min 83
The Shadow Record: A Virtual Root That Doesn't Exist in the Database — "Institution = 0" Above Units
Software Design PART 02

The Shadow Record: A Virtual Root That Doesn't Exist in the Database — "Institution = 0" Above Units

An "Institution = 0" root that doesn't exist in the database works safely if 0 is turned into an InstitutionUnitScope type (null inside) right at the API boundary; carry 0 as a plain int and you get empty lists on reads and FK violations on writes. Using Bookstore's institutional unit tree, the post compares the virtual root, a real root row, an Institution entity and an explicit scope contract with their trade-offs.

7 Nov 2026 15 min 67
What Is a Solution Pattern? Real-World Problems Missing from GoF and the Pattern Template
Software Design PART 01

What Is a Solution Pattern? Real-World Problems Missing from GoF and the Pattern Template

A solution pattern is a recurring application decision that, unlike the code-structure patterns of GoF (the Gang of Four), cuts across data, API and UI together (soft delete, sentinel values, a virtual root). This post introduces the series' Pattern Template, its fixed trade-off criteria and the starting schema of Bookstore's institutional ordering portal.

7 Nov 2026 15 min 73
Upgrading C# and .NET: Moving an Old Project to .NET 10
Backend PART 06

Upgrading C# and .NET: Moving an Old Project to .NET 10

Moving a .NET 6 project to .NET 10: the support calendar, how LangVersion relates to the TFM and the latest trap, pinning the SDK with global.json, reading the real CS8981 and CS9258 warnings, the silent behavior change of the field keyword and reading breaking-change pages; C# 15 gets its own post.

7 Nov 2026 10 min 112
What's New in C# 14: Extension Members, field and Null-Conditional Assignment
Backend PART 05

What's New in C# 14: Extension Members, field and Null-Conditional Assignment

C# 14 next to its C# 10 and C# 13 equivalents: null-conditional assignment skipping the right-hand side, extension properties, static extension members and extension operators, the field keyword, arrays converting to spans, nameof(List<>), lambda parameter modifiers, partial constructors/events and compound assignment operators.

7 Nov 2026 8 min 127
What's New in C# 13: params Collections, Lock and Partial Properties
Backend PART 04

What's New in C# 13: params Collections, Lock and Partial Properties

C# 13 next to its C# 10 equivalents: the new Lock type and the CS9216 trap, params collections with an allocation measurement, ref structs implementing interfaces and allows ref struct, partial properties, OverloadResolutionPriority, the \e escape and ^ indexes in initializers.

7 Nov 2026 8 min 93
What's New in C# 12: Primary Constructors and Collection Expressions
Backend PART 03

What's New in C# 12: Primary Constructors and Collection Expressions

C# 12 next to its C# 10 equivalents: why a primary constructor is a parameter rather than a property and the CS9124 warning, square-bracket collection expressions and spread, default lambda parameters, alias any type, inline arrays, the Experimental attribute and a note on interceptors.

7 Nov 2026 8 min 81
What's New in C# 11: Raw Strings, required and List Patterns
Backend PART 02

What's New in C# 11: Raw Strings, required and List Patterns

How we wrote it in C# 10 and how we write it in C# 11: raw string literals and the culture trap, required members and SetsRequiredMembers, list patterns, generic math with its language and library legs, file-local types and UTF-8 literals.

7 Nov 2026 8 min 86
Blog Map