<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>ASP.NET Core on Artur Rios Lab</title><link>https://lab.artur-rios.tech/tags/asp.net-core/</link><description>Recent content in ASP.NET Core on Artur Rios Lab</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 21 Oct 2026 19:30:00 +0000</lastBuildDate><atom:link href="https://lab.artur-rios.tech/tags/asp.net-core/index.xml" rel="self" type="application/rss+xml"/><item><title>How I Develop APIs</title><link>https://lab.artur-rios.tech/dotnet/how-i-develop-apis/</link><pubDate>Wed, 21 Oct 2026 19:30:00 +0000</pubDate><guid>https://lab.artur-rios.tech/dotnet/how-i-develop-apis/</guid><description>&lt;p&gt;Every backend I build is an ASP.NET Core API, and they all look alike on&#10;purpose. When the structure is the same everywhere, I never have to remember&#10;where a thing lives, a new feature is a list of files to add rather than a&#10;design decision, and a test that fails points at one small piece of code.&lt;/p&gt;&#10;&lt;p&gt;This page describes that shape, using&#10;&lt;a href="https://docs.artur-rios.tech/heimdall-api/"&gt;Heimdall&lt;/a&gt; as the example&#10;throughout. Heimdall is my identity management API: people, applications,&#10;logins, two-factor authentication and permissions, for several client systems&#10;at once, each in its own scope. It is the largest API I have, so every pattern&#10;here has been tested against a real use case rather than a toy one. All code&#10;on this page is taken from it, trimmed only where noted.&lt;/p&gt;</description></item><item><title>Web APIs</title><link>https://lab.artur-rios.tech/infrastructure/infrastructure-web-apis/</link><pubDate>Wed, 21 Oct 2026 17:55:00 +0000</pubDate><guid>https://lab.artur-rios.tech/infrastructure/infrastructure-web-apis/</guid><description>&lt;p&gt;My backends are ASP.NET Core APIs, and every one of them meets the platform the&#10;same way. Heimdall&amp;rsquo;s API is the example throughout; Fortuna&amp;rsquo;s follows the same&#10;shape.&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Concern&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Choice&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Framework&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;ASP.NET Core on .NET 10&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Image&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Multi-stage: the SDK to build, the ASP.NET runtime to run&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Database&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;The host&amp;rsquo;s PostgreSQL, one database per environment&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Configuration&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Environment variables, from yggdrasil&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Health&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;/healthcheck&lt;/code&gt;, probed by Docker, yggdrasil and the status API&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Metrics&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;OpenTelemetry&amp;rsquo;s Prometheus exporter, on port 9464&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Logs&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Standard output, shipped to Loki&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Checks&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Tests and a Docker build in GitHub Actions&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h2 id="the-image"&gt;The image&lt;a class="heading-anchor" href="#the-image" aria-label="Link to this section"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The Dockerfile has two stages. The first restores and publishes with the .NET&#10;10 SDK, copying the project files before the sources so a source-only change&#10;reuses the cached restore. The second copies the output onto the much smaller&#10;ASP.NET runtime image, and runs it as the image&amp;rsquo;s own non-root user:&lt;/p&gt;</description></item></channel></rss>