This media query property lets you style your web application differently when your app runs as a PWA (Progressive Web App). This lets you hide/show or resize HTML elements when your application is launched in standalone mode. Hide that header or footer when you're in app mode, so your application feels more native. Use case: Make … Continue reading CSS Media Query for display-mode
Blog Feed
Blazor WASM in .NET 10 has Faster Startup
With .NET 10, Microsoft went back to the drawing board on how Blazor WASM starts up and ships assets. Instead of making minor, pathed fixes to Blazor WASM, they reworked compression, caching, and bootstrapping. The results are smaller downloads, faster first loads, and a developer experience that finally competes with the mature front-end frameworks. Here’s … Continue reading Blazor WASM in .NET 10 has Faster Startup
D20Tek.Functional Migration Guide: Option → Optional
Why the Change? The Option<T> class served as a good starting point for building a functional class that manages having a value or not, but its naming doesn’t align well with .NET conventions because it already has the concept of Option for defining application settings. Therefore, we’ve introduced a new Optional<T> type that’s cleaner, more … Continue reading D20Tek.Functional Migration Guide: Option → Optional
Evaluating Open Source Dependencies
In the evolving world of open-source software (OSS), it's becoming more common for widely used packages to shift from free offerings to subscription-based models. For software teams, especially senior developers, team leads, and architects, this trend introduces new considerations when evaluating which libraries to adopt. As engineers, our primary responsibility is to balance these decisions … Continue reading Evaluating Open Source Dependencies
Mediator: Sync and Async Commands
D20Tek Mediator supports both synchronous and async commands. In many cases, synchronous commands are plenty. But when working with data files, external service calls, and databases, it is best for performance throughput to build async WebApi handlers and async commands that process that data. To this point, we have mostly looked at synchronous ICommandHandlers. Here … Continue reading Mediator: Sync and Async Commands
Introducing MinimalApi.DevView – .NET Toolkit for Minimal APIs
Minimal APIs in .NET make it easy to build lightweight web services with minimal ceremony, but during development, visibility into what your app is doing can be a challenge. That’s what MinimalApi.DevView helps you with. Today, I’m excited to announce the release of D20Tek.MinimalApi.DevView v1.0, a dev-time only diagnostics and discovery toolkit designed specifically for … Continue reading Introducing MinimalApi.DevView – .NET Toolkit for Minimal APIs
Ignoring EF Migrations from Code Coverage
I was working unit and functional tests for a project that had a database using EntityFramework. It had multiple migrations that we had applied over time. These migrations are placed as code in our project under a Migrations folder. As I was building and running unit tests, I saw large block of code that we … Continue reading Ignoring EF Migrations from Code Coverage
Simplifying JWT Authentication in Development with ‘dotnet user-jwts’
When developing secure APIs in ASP.NET Core, implementing authentication can often slow down the development cycle, especially when integrating with full-fledged identity providers like Auth0 or Azure AD. Fortunately, starting with .NET 7, Microsoft introduced a powerful CLI tool that streamlines this process: dotnet user-jwts. In this post, we'll explore what dotnet user-jwts is, how … Continue reading Simplifying JWT Authentication in Development with ‘dotnet user-jwts’
Using Code Cleanup Profiles in Visual Studio
In Visual Studio 2022, the Code Cleanup Profiles feature is a great way to automate code formatting and clean-up operations using predefined or custom rules. By using cleanup profiles, you can make all of the changes in one operation and free yourself from updating lots of code files manually. Here's a detailed explanation of how … Continue reading Using Code Cleanup Profiles in Visual Studio
create-guid: Simple CLI Tool for Generating GUIDs
In modern software development, GUIDs (Globally Unique Identifiers) are used everywhere: from identifying database records and correlation tokens to generating unique keys for distributed systems. While System.Guid.NewGuid() is the standard way to generate GUIDs in .NET, there are scenarios where you want a tool that gives you quick and scriptable access to GUIDs from the … Continue reading create-guid: Simple CLI Tool for Generating GUIDs