Why I keep coming back to .NET

Administrator

Administrator - 08/17/2026

.NET gave me a coherent route from typed application code to identity, data access, background work, real-time communication, testing and Linux deployment. KUUT also taught me where that convenience stops and engineering judgement starts.


Tags: .NET10 C# ASP.NETCore dependencyinjection async NuGet EntityFrameworkCore SignalR 

A practical sales pitch based on one site rather than a feature checklist. Project period: June 2022 to present.

KUUT began in 2022 because I wanted to learn C# and .NET by building something too large to bluff my way through. A basic blog would have taught me routing and templates. Building the CMS, identity system, search, comments, mail, real-time UI and deployment forced me to find out whether the platform still felt pleasant once the project had awkward edges.

It did.

That is not the same as saying every .NET application is good, every abstraction is free or every Microsoft library should be installed because NuGet makes it easy. I have written enough overenthusiastic code in this repository to disprove that. What I like is the continuity of the platform. C#, ASP.NET Core, the dependency-injection container, Entity Framework Core, Identity, configuration, logging and deployment tooling feel like parts of one system rather than a pile of unrelated choices held together by an optimistic build script.

The current KUUT application targets .NET 10. The first version targeted .NET Core 3.1. Being able to bring the same application forward, while preserving its content model and replacing the parts that had aged badly, is a stronger recommendation than any feature grid I could write.

C# lets me be explicit without making me suffer for it

C# occupies a useful middle ground. The type system catches ordinary mistakes and supports interfaces, generics, records, nullable analysis, pattern matching and asynchronous methods. At the same time, I can write a small controller action without constructing an academic monument around it.

KUUT uses generics in its CMS data access, expression trees for runtime filters, reflection for sitemap and search indexing, and interfaces for common content behaviour. Some of those experiments are more successful than others, but the language allowed me to explore them without dropping into a different tool every time the problem changed shape.

The compiler is part of the design feedback. When I modernised an older model for nullable reference types, it exposed assumptions the original code had left implicit. The answer was not to silence every warning. I had to decide which database columns were optional, preserve the existing schema and improve the model without manufacturing a destructive migration.

That is exactly the kind of argument I want a language and toolchain to make me have.

Dependency injection is ordinary infrastructure

ASP.NET Core includes a dependency-injection container, and it becomes useful very quickly. KUUT registers its database contexts, Identity, sitemap builder, search index, HTML sanitiser, CMS asset store, SignalR hub and email service with explicit lifetimes.

The distinction between singleton, scoped and transient is not decoration. A database context belongs to a request scope. A stateless configuration or indexing service may live longer. A transient mail service can be created when needed. Making those choices in one composition root gives the application a readable map of its moving parts.

Controllers receive what they need through constructors. They do not need to find a global service locator or create a database connection for themselves. That reduces hidden state and makes substitution in tests possible.

DI can still be abused. A constructor with twelve services is not proof of excellent decoupling; it may be a class admitting it has twelve responsibilities. Registering a stateful singleton without thinking about concurrent requests can create bugs that are impressively difficult to reproduce. The container handles object construction and disposal. It does not handle judgement.

Async fits the work a website actually does

Web applications spend much of their time waiting for I/O: databases, files, networks and mail servers. C#'s task-based async model lets that waiting appear in the code as a sequence of operations without blocking a request thread at every pause.

KUUT's startup path awaits database creation or migrations, role seeding, the sitemap, the content index and finally the web host. Controllers await EF queries and saves. Asset validation copies input asynchronously and accepts cancellation tokens. The code still reads from top to bottom:

await contentContext.Database.MigrateAsync();
await ContextSeed.SeedRolesAsync(userManager, roleManager);
await services.GetRequiredService<Sitemap>().Build();
await services.GetRequiredService<Atlas>().Build();
await host.RunAsync();

Async is not the same as creating a new thread. For I/O-bound work, await allows the caller to continue serving other work until the operation completes. CPU-heavy work is a different problem and may require parallelism, a background queue or a separate process.

This is another area where compact syntax can encourage nonsense. Blocking on .Result, wrapping naturally asynchronous I/O in Task.Run, or starting tasks that nobody observes can make a program worse. The model is simple to use, but it still needs to run consistently through the call chain.

Entity Framework and LINQ keep data work close to the application

Entity Framework Core is not a reason to ignore SQL. It is a reason I do not have to write the same mapping code for every ordinary operation.

The KUUT content model includes posts, projects, pages, authors, comments, images, routes and uploaded assets. EF maps those objects and relationships to SQLite or SQL Server. LINQ composes filters and projections; Include and ThenInclude state which related data is needed; migrations record schema changes as source code.

The combination is productive because the types, queries and application rules meet in the same place. It is also inspectable. When performance matters I can look at the generated SQL, check indexes and adjust the query shape. An ORM is an abstraction over the database, not a force field around it.

My early CMS added a generic retrieval layer on top of DbContext. It made controllers tidier, but its type switch is less generic than the method signature suggests. I would now organise more of that code around specific operations and projections. .NET made the abstraction easy to build. Experience told me which part was worth keeping.

The batteries are useful because they fit together

The platform covers much more than HTTP endpoints. KUUT uses ASP.NET Core Identity for users and roles, SignalR for real-time browser communication, rate limiting at the web boundary, data protection for application secrets, MailKit for email, an HTML sanitiser for CMS content and Newtonsoft.Json where its serialisation behaviour is still useful.

NuGet makes those packages easy to find and version, but package count is not an achievement. Every dependency adds maintenance, security and compatibility work. I prefer the framework's built-in capability when it meets the requirement, then add a package for a clear reason.

The good part of the ecosystem is not simply that it is large. It is that many libraries integrate with the same configuration, logging, options and dependency-injection conventions. A package that behaves like the rest of the application is much easier to live with than one that arrives carrying its own universe.

KUUT once referenced AutoMapper, for example, but the repository does not contain meaningful mapping configuration that I would use as evidence of good practice. A package in a project file proves that I installed it. It does not prove that the project benefited from it.

Linux deployment is not an afterthought

The application is written on Windows and deployed as a Linux container. A multi-stage build compiles the TypeScript and CSS, publishes the .NET application, and produces the runtime image. Caddy terminates HTTPS. SQLite volumes hold the data for a deliberately single-instance site. GitHub Actions builds the application and container before a manual deployment step updates the server.

That cross-platform route is now unremarkable, which is praise. I do not need a Windows server simply because the application is written in C#. The same CLI handles restore, build, test and publish. The runtime packaging is explicit enough to reproduce in CI rather than depending on the history of one development machine.

Containers do not remove operations. I still need backups, migration tests, log limits, health checks, secret handling and a rollback path. They make the unit of deployment more predictable.

What .NET 10 adds

.NET 10 is a long-term-support release with three years of support. KUUT now targets it, but I do not want to turn that fact into a catalogue of APIs the site does not use.

The runtime includes further work on JIT inlining, devirtualisation, stack allocation and code generation. Those improvements can benefit ordinary applications without source changes, although the only honest way to claim a performance gain for this site would be to measure it.

The libraries add stricter JSON serialisation options, including duplicate-property checks, along with new networking, cryptography, diagnostics and collection APIs. ASP.NET Core 10 adds work across OpenAPI, minimal APIs, Blazor, diagnostics and Identity, including passkey support. The SDK also continues improving container and tool workflows.

These are reasons to evaluate the release, not reasons to rewrite working code to use every new API. The most valuable feature for KUUT is the supported modern baseline: current runtime fixes, current framework packages and a route away from the obsolete .NET Core 3.1 foundation on which the first version was built.

Why it works for me

I build things that tend to cross boundaries. A project may begin as a website, acquire a database and asset pipeline, then need a real-time interface, a geometry viewer, background processing and a safe deployment route. .NET gives me a strong centre for that work.

It is not the answer to every problem. I use TypeScript in the browser, Python where its scientific ecosystem is the sensible choice, and lower-level languages when hardware or performance demands it. Choosing .NET does not require pretending the rest of computing has made a terrible mistake.

For application back ends, tools and services, it gives me a good balance of speed, legibility, libraries and operational maturity. More importantly, I can return to a four-year-old codebase, understand what it was trying to do and move it onto a current platform without throwing the whole thing away.

That is my sales pitch. The framework helped me build the first version. The ecosystem helped me run it. The language made the mistakes readable enough to fix later.

Sources