• Web API Architecture: Services and Repositories

      In the previous post, we added global error handling and logging using NLog. Now that we’ve made our API more resilient, it’s time to go forwards with cleaning up the architecture and separate concerns.

    • Web API Exception Handling and Logging

      In the previous post, we set up a basic .NET 9 Web API project. Now it’s time to take things further by adding global error handling and logging to make our API more robust.

    • Web API Project Setup and Migrations

      Welcome to the first post in the “.NET Core Web API – Step-by-Step Best Practices” series. In this series, we’ll walk through building a modern, clean, and maintainable Web API using .NET 9. Each post will focus on a specific aspect—from project setup and architecture to testing, migrations, and deployment.

    • Understanding State Machines with a Practical Example in C#

      State machines might sound like a complex topic, but at their core, they’re just a way to manage different states in a system and control how things transition from one state to another.

    • Design Patterns: Prototype

      In software development, there are scenarios where creating multiple objects with similar attributes and configurations is necessary. Instead of constructing each object from scratch, a more efficient approach is to duplicate an existing instance. This is precisely what the Prototype Design Pattern facilitates.

    • Code Review Best Practices

      Code reviews are a crucial part of writing great software. They help maintain code quality, catch bugs early, and improve collaboration. But if done poorly, they can be frustrating, time-consuming, and even demotivating. So, how do you make your code reviews effective and useful?

    • TDD and Mocking

      In the last post we have discussed core principles of unit testing and TDD. In this post, we’ll walk through a simple example of how to use Moq as mocking framework and Dependency Injection with NUnit in the context of Test-Driven Development (TDD) in C#. This combination allows for clean, maintainable tests by mocking dependencies and focusing on the behavior of the system under test.

    • Unit Testing and Test-Driven Development (TDD) in C#

      Writing code without unit tests can be risky—you might not realize issues until it’s too late. Unit testing helps make sure your code actually does what it’s supposed to. In this post, we’ll break down unit testing in C# using NUnit and explore how Test-Driven Development (TDD) can make your life easier.

    • Dependency Injection In .NET Core With Strategy Pattern

      In the previous post, we gave an introduction and explained the basic concept of the Strategy Pattern. Now, we want to go a bit further and demonstrate how it works in practice alongside a dependency injection in .NET Core. Instead of manually instantiating strategies, we let the ASP.NET Core DI container inject the correct implementation at runtime.

    • How To Pay Programmers Less

      Before we kick off, just a quick mention that the intention of this post is pure fun, so please don’t take it too seriously! :) ….