The organisation already runs Microsoft systems, or a new service needs a mature cross-platform runtime and a strongly typed application model. C# can be an excellent fit, provided the decision includes .NET support, deployment and data access rather than stopping at language familiarity.
C# spans web APIs, business applications, workers, desktop software, cloud functions and games through several .NET and framework ecosystems. Modern .NET runs across operating systems; older .NET Framework applications retain Windows-specific assumptions and libraries. Those are different modernisation starting points.
We choose C# with a named runtime, workload and support line, then test the production artefact on its real host.
C# belongs to a .NET platform decision
The language provides records, pattern matching, generics, async functions and nullable analysis. The runtime supplies garbage collection, JIT or ahead-of-time compilation options, libraries, diagnostics and deployment formats. ASP.NET Core or another framework adds the application model.
That integrated platform can reduce library assembly for APIs and business services. It is particularly useful where teams already know .NET operations, Azure or Microsoft identity and SQL Server.
The same integration can create accidental assumptions. C# source does not require Windows, yet COM, registry, desktop UI, integrated authentication and old packages might. We inventory those dependencies before promising a Linux container or cloud move.
A new C# service should still justify a second backend platform if the organisation already operates another suitable one. Strong language features do not pay for duplicate on-call skills by themselves.
Nullable reference types are compile-time intent
C# nullable reference annotations state whether a reference is intended to allow null and drive compiler flow analysis. Microsoft’s nullable reference documentation is clear that runtime behaviour is unchanged.
External requests, database rows, deserialisation and older libraries can still produce values that violate an annotation. The null-forgiving operator suppresses a warning; it does not check the value. We use it only beside a framework or validation invariant we can explain.
Enabling nullable analysis on an old codebase is a migration. We start at module boundaries, address warnings rather than blanket-suppressing them and make new code meet the target. In EF Core, changing annotations can influence generated schema migrations, so code and database nullability are reviewed together.
The aim is a trustworthy contract, not zero warnings achieved through ! and disabled regions.
Async code must remain asynchronous through the call path
async and await make task-based I/O readable and allow web servers to use threads for other requests while operations wait. Blocking on asynchronous work with .Result or .Wait() can waste threads or deadlock in contexts with a synchronisation model.
We keep request paths asynchronous through HTTP, database and storage libraries. CPU-heavy work does not become cheaper because it runs inside Task.Run; sustained computation needs bounded workers and capacity design.
Cancellation tokens are propagated to lower operations and timeouts express an external dependency budget. Cancellation is cooperative and may arrive after a side effect, so idempotency and state reconciliation remain necessary.
Background work is not started as an unobserved task inside a web request. It belongs in a hosted service or durable queue with shutdown, retries and failure visibility.
Entity Framework Core does not remove SQL ownership
EF Core can provide productive models, LINQ queries, migrations and change tracking. LINQ is translated to database SQL according to provider capability. An expression compiling in C# does not guarantee one efficient query.
Microsoft’s EF Core performance guidance covers indexes, projections, result limits, tracking and related-data loading. We inspect generated SQL and query count on important routes.
Long-lived contexts can retain tracked entities and stale assumptions. Request-scoped or unit-of-work lifetimes should match the transaction boundary. Bulk operations and reports may be clearer through direct parameterised SQL.
Database migrations receive live-release review. A generated migration that changes a required property can lock or rewrite a large table regardless of how small the C# diff appears.
.NET support cadence is part of product maintenance
.NET publishes Standard Term Support and Long Term Support releases with defined end dates. The official .NET support policy records supported versions and servicing expectations.
LTS provides a longer window, not indefinite maintenance. Runtime and ASP.NET patches are applied regularly, and the application is rebuilt and redeployed on the patched base. Framework and package support ranges may impose earlier movement.
We record SDK and runtime in project and CI configuration, avoid relying on a developer’s global installation and test the next supported line before the current one approaches end of support.
C# language version, target framework and runtime are connected but not identical. New syntax can sometimes target an older runtime; a new API cannot. The project file is the contract.
Deployment model changes startup, size and diagnosis
.NET applications can be framework-dependent or self-contained and can target containers or native ahead-of-time compilation in supported workloads. Each option changes artefact size, runtime patching, startup and compatibility.
Framework-dependent deployment shares an installed runtime and receives its servicing centrally. Self-contained deployment carries the runtime and must be republished to receive its fixes. Native AOT can reduce startup and memory for suitable applications but restricts dynamic features and libraries.
We choose from the hosting environment and measured need. A conventional ASP.NET Core container may be the clearest operational boundary. A small command-line tool may benefit from one self-contained executable.
Production symbols, structured logs, traces and dumps make runtime failures diagnosable. Microsoft’s dotnet-counters, dotnet-trace and dump tools are included in runbooks with access and data controls.
Legacy .NET Framework migration starts with dependencies
An old .NET Framework application may depend on Windows-only libraries, ASP.NET System.Web, WCF hosting, COM or unsupported third-party controls. Moving source to a modern target framework is therefore an application and dependency migration.
Microsoft’s .NET upgrade guidance recommends assessing compatibility and provides tooling, but the business still needs behavioural tests and a staged release route.
We first make the current build repeatable and identify modules that can target .NET Standard or modern .NET independently. Stable components remain until a support, security or product reason justifies change.
A rewrite can lose hidden business rules. Characterisation tests, production traffic evidence and data contracts protect them while the hosting and framework change.
Questions to answer before approving C
- “Which .NET workload and framework will carry the product?” Name more than the language.
- “Which Windows-only dependencies prevent cross-platform deployment?” Audit before promising containers.
- “Where can runtime null violate annotations?” Validate requests, data and legacy APIs.
- “Does async I/O remain non-blocking through the stack?” Test cancellation and thread pressure.
- “Which EF queries and migrations need direct SQL review?” Use representative data.
- “Which .NET support line and deployment model will production use?” Schedule servicing.
- “What legacy behaviour must survive migration?” Add evidence before porting.
When C# is a sound platform choice
Choose C# and modern .NET for APIs, business systems and workers where its runtime, libraries, tooling and organisational fit reduce delivery risk. It is strong in Microsoft estates without being limited to Windows.
The decision is complete with an explicit target framework, data-access evidence, support calendar and production diagnostics. Those parts turn good language ergonomics into a maintained service.
When C# adds a platform without enough return
Keep the established backend stack when it meets the requirement and the organisation lacks .NET production capability. A familiar syntax is a weak reason for another runtime.
Do not force an old .NET Framework application into a Linux or container promise before auditing its dependencies. Host it safely while the actual blockers are removed.
And avoid rewriting stable code solely to use current C# features. Modernise where support, operability or product change pays for the migration.
Choose C# with its .NET runtime, data and support model fully named.
I use C# for business software where modern .NET, its libraries and the team's operating knowledge form a coherent platform. I want nullable boundaries, async behaviour, EF queries and runtime support included in the choice. If an old Windows dependency blocks the promised architecture, I surface it before the migration sale.
Alexander De Sousa · Founder, Digital Royalty · LinkedIn
What C# ownership includes across the modern .NET platform
C# supplies a rich language and .NET supplies runtime and libraries. Data access, deployment format, diagnostics, support cadence and legacy dependencies decide fit.
The C# and .NET commitment in six decisions
- Best fit
- APIs, workers and business applications that benefit from .NET libraries, tooling, runtime diagnostics and existing organisational capability.
- Product effect
- Strong compile-time contracts and mature service tooling, with runtime truth at request, database, package and operating-system boundaries.
- Adoption cost
- Moderate for a new modern .NET service; high where .NET Framework, Windows-only APIs and old UI or server frameworks need migration.
- Ongoing owner
- .NET engineers responsible for SDK and runtime support, packages, async work, database access, deployment, diagnostics and platform patches.
- Exit cost
- Moderate for conventional services; high for desktop UI, Microsoft-specific identity and deep framework or cloud integration.
- Proof required
- Release artefact on the intended OS, invalid null and request data, representative EF query, cancellation under load, runtime upgrade and decoded production trace.
Modernisation and platform routes to compare
-
Modern cross-platform .NET
Right when: A new or modernised service benefits from current .NET runtime, libraries and cross-platform hosting.
Watch for: Verify packages and Windows integrations on the actual Linux or container target.
-
Maintain .NET Framework while isolating change
Right when: A stable Windows application contains valuable behaviour and migration risk is greater than its immediate support or product benefit.
Watch for: Record framework and dependency support and create tested seams for future extraction rather than freezing the estate indefinitely.
-
Incremental modern .NET migration
Right when: Hosting, support or product needs justify movement and dependencies can be replaced or separated in deployable stages.
Watch for: Protect hidden behaviour with tests and avoid combining framework, database and interface rewrites in one release.
-
Keep the established backend platform
Right when: Existing Java, PHP, Node or another stack meets the requirement and a new .NET capability would add more operation than value.
Watch for: Evaluate actual support and team health rather than retaining an obsolete stack by default.
Research behind this C# position
-
Official language model
C# overview
Places the language inside .NET's type, runtime and application ecosystem rather than presenting C# as a standalone deployment choice.
-
Official nullability
C# nullable reference types
Defines compile-time annotations and flow warnings and states that runtime behaviour remains unchanged.
-
Official asynchronous guidance
Task asynchronous programming model
Documents task-based async composition and exception and cancellation behaviour.
-
Official data guidance
EF Core performance
Covers indexes, projections, result limits, query forms and diagnosis of generated database access.
-
Official support policy
.NET support policy
Lists active release types, patch requirements and end-of-support dates for planning production runtime upgrades.
-
Official migration guidance
Porting from .NET Framework to .NET
Provides assessment and migration routes for applications whose APIs and dependencies may not move directly.
-
Practitioner question
Stack Overflow: async deadlocks and blocking calls
The discussion illustrates task composition and blocking misunderstandings; current Microsoft async guidance should govern implementation.
-
Community ecosystem survey
.NET Foundation State of .NET survey
Community resources provide ecosystem context. Team capability and workload evidence remain more important than broad adoption for one product.
Tell us what you need
A few quick questions, then a straight answer from a real person — usually within a few hours.
What happens next
- 1 We reply A real person reads your answers and gets back to you, usually within a few hours.
- 2 Questions or a short call If anything isn't clear, we ask by email or book a short call. Before any call we audit your website and make the quick fixes it finds, free.
- 3 Your fixed quote A clear, fixed price in writing, within 48 hours of any call. There is no obligation to go ahead.
Tell us what you're working on
Whether it's a new site, a platform, or a process that shouldn't be manual any more — we'll tell you honestly if we can help.