Skip to main content

.NET

.NET (pronounced as "dot net"; previously named .NET Core) is a free and open-source, managed computer software framework for Windows, Linux, and macOS operating systems. It is a cross-platform successor to .NET Framework. The project is primarily developed by Microsoft employees by way of the .NET Foundation, and released under the MIT License. - Source: Wikipedia.

A collection of 73 posts

ioptions, validate settings in .net, ioptions pattern, options pattern
.NET

Validate Settings Using The IOptions Pattern in .NET

· Christian Schou Køster

state design pattern, avoid if-else in .net
.NET

Avoid Complexity with the State Design Pattern in .NET

Struggling with complex if-else chains in your growing codebase? Let me show you how the state design pattern can simplify logic, boost maintainability, and make your code easier to scale—with a practical, real-world example of a document flow.

· Christian Schou Køster

dotnet, logging, ca1848
.NET

How To Achieve High-Performance Logging in .NET

Traditional .NET logging can slow your app. Switch to LoggerMessage delegates for better performance or leverage source-generated logging (in .NET 6+) for minimal runtime costs and cleaner code. Boost efficiency, reduce overhead, and log like a pro! 🚀

· Christian Schou Køster

Use JsonSerializer to Pretty-Print JSON in .NET
.NET Tips

Use JsonSerializer to Pretty-Print JSON in .NET

Formatting JSON as plain text with proper indentation can make it much easier to include in emails or other readable contexts. Here's a quick tip/guide on how to achieve that in .NET.

· Christian Schou Køster

.net, nameof, c#, refactoring
.NET Tips

Use nameof to Keep Code Refactoring-Safe

Using nameof in .NET helps make code more maintainable and resilient to refactoring. It returns names as strings tied to code directly, improving readability, refactoring safety, and compile-time error checking.

· Christian Schou Køster

Enhance String Semantics with the StringSyntax Attribute
.NET Tips

Enhance String Semantics with the StringSyntax Attribute

Learn how to use the StringSyntax attribute in .NET to clarify string formats like DateTime, JSON, or Regex, enhancing readability, IDE support, and reducing errors when writing .NET or C# code ✌️

· Christian Schou Køster

connect web api to web app, .net web api, .net web app, connect .net mvc to api
.NET

How To Connect A .NET Web API With A .NET MVC Web App?

With the world heading more and more into container services, we are changing applications into APIs communicating with each other. In this tutorial, you will learn how to connect a .NET Web API with a .NET MVC Web Application and nicely present the data with Bootstrap.

· Christian Schou Køster

validate urls with c#, c# url validation, validate url with regex, url validation, twv c#, how to validate url in c#
.NET

How To Validate URLs With C#

Learn how to validate URLs using C# with some of my code snippets in this C# tutorial and see what options is best in terms of performance.

· Christian Schou Køster

.net 8 data annotations, data annotations, length attribute, range attribute, deniedvalues, allowedvalues
.NET

The New Data Annotations in .NET 8

The latest LTS version, .NET 8, introduces new DataAnnotations for enhanced validation of strings and numbers. This article explores these annotations and shows you how to use them i practice.

· Christian Schou Køster

query splitting, assplitquery, ef core, entity framework core, ef core query splitting
.NET

How To Improve Query Performance Using EF Core Query Splitting

In the market for optimizing your database queries using EF Core? In this tutorial I will show you a practical example of using Query Splitting, the results in SQL and give you a heads up before implementing it in your application.

· Christian Schou Køster

dto, .net dto, data transfer object, how to use dto, dto usage
.NET

How to use DTOs the right way in .NET

· Christian Schou Køster

mapster, mapster .net, mapster mapper, mapster .net7, .net7
.NET

How to use Mapster with .NET 7 - A Quick Introduction

Learn how to use Mapster with C# and .NET in this short but explanatory tutorial.

· Christian Schou Køster

solid, solid principles, solid c#
.NET

What Are The SOLID Principles? The Art Of Writing Clean And Maintainable Code in C#

· Christian Schou Køster

loggerfactory, logging, log factory, c# logging, logging in .net core, .net logging, microsoft.extensions.logging
.NET

Logging in .NET - A Guide to LoggerFactory and Microsoft.Extensions.Logging with C#

Discover the art of logging in .NET Core apps! This tutorial covers best practices, advanced techniques, and testing for effective monitoring and debugging.

· Christian Schou Køster

sealed class, sealed, sealed class c#
.NET

Supercharge Your C# Classes - A guide to the Sealed Keyword for Better Code Control

· Christian Schou Køster

email regex, mail regex, email regex c#, email regex in c#, email regex csharp, email regex in csharp
.NET

Email Regex in C#

Looking for regular expressions to validate an email or extract an email from a string in C#? In this short tutorial, I will show you how to validate and extract emails in C# using Regex.

· Christian Schou Køster

observer design pattern, observer pattern, observer design, design pattern
.NET

Observer Design Pattern - A Beginner's Guide with an Airport Baggage System

Are you in the market for learning how to implement the Observer Design Pattern? This tutorial will show you how to apply this pattern with C# and diagrams to make your understanding even better.

· Christian Schou Køster

casing methods, c#, casing csharp, name conventions c#, best practices c#
.NET

C# Casing methods 101 - Mastering the different casing conventions

Mastering the different casing conventions and when to use them can make your code more readable and easier to understand for yourself and others. In this post, you will learn how and when to use the different casing methods.

· Christian Schou Køster

httpclient, httpclientfactory, unit test httpclientfactory, api
.NET

Simplify API Requests in .NET with HttpClientFactory: A Step-by-Step Guide

· Christian Schou Køster

Retrieve values from Iconfiguration, iconfiguration, options, dotnet configuration
.NET

How to retrieve values from IConfiguration in .NET

· Christian Schou Køster

.asnotracking(), asnotracking, dotnet, c#
.NET

What is .AsNoTracking() and how can it make your code perform better?

· Christian Schou Køster

Best Practices for C# - Coding Standards
.NET

Best Practices for C# - Coding Standards

This blog post outlines best practices for C# coding standards, covering class and variable naming, enums, and more. Improve your code consistency and readability with these tips.

· Christian Schou Køster

Nginx Reverse Proxy for .NET Core Web API using Docker, nginx reverse proxy, nginx docker compose
Docker

How to Set Up an Nginx Web Server with Docker Compose and Use it as a Reverse Proxy for .NET Web APIs with SSL and load balancing

Learn how to create an Nginx web server with Docker Compose, configure it with environment files, and use it as a reverse proxy for .NET Web APIs. Secure it with HTTPS and implement load balancing for high availability.

· Christian Schou Køster

facade pattern, library management system, retail manegement system
.NET

Facade Pattern - C# Design Patterns

Learn how to use the Facade design pattern in C# to simplify a complex system and provide a unified interface to clients.

· Christian Schou Køster

formatting if statements, properly code formatting, if formatting, c#
.NET

Properly Formatting IF Statements in Your C# Code

· Christian Schou Køster

Demystifying Concurrency, Parallelism, and Asynchronous Programming in .NET, Concurrency, Parallelism, Asynchronous
.NET

Concurrency, Parallelism, and Asynchronous Programming in .NET - What is The Difference?

Your complete guide to discovering the nuances of concurrency, parallelism, and async in .NET. Learn key differences & see code examples to enhance performance & responsiveness in your applications.

· Christian Schou Køster

The Ultimate Cheat Sheet for C#
.NET

The Ultimate Cheat Sheet for C#

Looking to improve your C# programming skills? Look no further than this C# ultimate cheat sheet! Covering everything from the basics to advanced features, with real-world code examples. Learn object-oriented programming, collections, exception handling, file I/O, LINQ, multithreading, and more...

· Christian Schou Køster

How to convert any list to a string with C#
.NET

How to convert any list to a string with C#

Converting a list to a string is a common task in C# programming. Whether you need to display the contents of a list in a user interface or pass a list to a web service, knowing how to convert a list to a string is a fundamental skill for any C# developer.

· Christian Schou Køster

masstransit with rabbitmq, masstransit, rabbitmq, masstransit .n
.NET

How to use MassTransit in .NET Core with RabbitMQ

· Christian Schou Køster

How to Connect MySQL Database with Entity Framework Core in .NET
.NET

How to Connect MySQL Database with Entity Framework Core in .NET

· Christian Schou Køster