Welcome! 👋

I’m a C# developer and Azure architect sharing insights and ideas.

Enjoy!

Build better C# API Clients: OpenAPI and Kiota

Integrating with external APIs has become a fundamental part of modern application development. However, building and maintaining API client libraries can be tedious and error-prone, especially when dealing with complex APIs that change frequently. Traditionally, developers have written these clients manually, which has resulted in a lot of code and models that need maintaining when the API evolves. In this blog post, we will explore an alternative approach using Microsoft Kiota for automatically generating strongly-typed API clients from an API’s OpenAPI specification. There’s also the added benefit that all client implementations look and feel similar, providing a better developer experience. ...

May 11, 2025 · 6 min · 1211 words · Frederik Baun

Distributed Rate Limiting with Redis

In today’s modern app development, many applications are distributed with multiple instances running in parallel. While there are numerous benefits to this, there is also greater complexity in handling things that previously were a lot simpler - one of those things is rate limiting. In this blog post, we will look closer at what rate limiting is, some real-world applications, and how we can implement this in a distributed environment. ...

April 18, 2025 · 6 min · 1213 words · Frederik Baun

ChatGPT Code Interpreter: Dynamic Sessions

In this blog post series we will be aiming to replicate the powerful Code Interpreter tool known from ChatGPT. This tool enables dynamic code execution, providing value in scenarios like data analysis, automation and custom workflows. In this first part we will focus on the technical aspect of running generated code securely in an isolated environment. This ensures that any potentially malicious code cannot harm the surrounding infrastructure. By the end of this series we will have recreated the core functionality of ChatGPT’s Code Interpreter, which dynamically generates and executes code for end users. Along the way we will explore the technologies, best practices and challenges involved in building such a tool. Stay tuned for a deep dive into both the technical and practical aspects of this topic! ...

January 26, 2025 · 5 min · 1033 words · Frederik Baun

Vertical Slices: ASP.NET Core

In the rapidly evolving landscape of software development, maintaining agility and scalability is paramount. In this post, we’ll delve into the Vertical Slice approach to software design within ASP.NET Core — a modern alternative to the traditional layered architecture. Unlike conventional methods that compartmentalize code by technical roles, Vertical Slices organize code by feature, enhancing maintainability and reducing complexity. We’ll explore what Vertical Slices are, compare them to layered architectures, and walk through their implementation using essential tools like MediatR, FluentValidation, and OneOf. By the end, you’ll have a practical template to adopt this approach, streamlining your development process. ...

January 10, 2025 · 10 min · 2079 words · Frederik Baun