C#
-
Exploring Alternatives to Fluent Assertions in .NET Testing

Fluent Assertions has long been a popular choice in .NET for writing clean, expressive test assertions. However, there are plenty of alternatives worth exploring—especially now, as teams re-evaluate their dependencies. Libraries like Shouldly and NFluent offer a more natural, “English-like” or chainable syntax, and each delivers robust features alongside detailed error messages. Meanwhile, traditional test… Continue reading
-
Deciphering Programming Paradigms with C#

Venturing beyond the entertaining yet often superficial ‘language wars’, this blog dives deep into the heart of programming paradigms using C# as our lens. From the organized realms of Object-Oriented Programming to the mathematical rigor of Functional Programming and the step-by-step logic of Procedural Programming, we explore how mastering these paradigms can elevate our coding… Continue reading
-
Crafting Custom Validators in ASP.NET Core: A Comprehensive Guide

Unlock the power and flexibility of custom validators in ASP.NET Core with our in-depth guide. Dive deep into the creation of tailor-made validation rules, balancing both server-side and client-side checks. Discover best practices, from clear error message Continue reading
-
How to apply SOLID Principles

In this blog post, we explored the power of SOLID principles in improving the design and maintainability of code. By refactoring a complex class in an e-commerce application, we witnessed the transformation from a monolithic and tightly coupled structure to a modular and flexible architecture. Through the Single Responsibility Principle, we learned how to divide… Continue reading
-
Exploring Lesser-Used LINQ Functions in C#

LINQ (Language Integrated Query) is a powerful feature in C# that allows developers to query data from various data sources such as arrays, lists, and databases. While many developers are familiar with the basic LINQ functions such as Where, Select, and OrderBy, there are several lesser-used LINQ functions that can be very useful in certain… Continue reading
-
Handling Exceptions in ASP.NET Core: A Guide to app.UseExceptionHandler

Exception handling is an essential part of building robust and reliable applications. ASP.NET Core provides developers with various approaches to handle exceptions, each with its own advantages and use cases. In this blog, we discussed how to use the app.UseExceptionHandler middleware, global exception handling, and exception filters to handle exceptions in ASP.NET Core. We also… Continue reading
-
Custom Error Responses in a .NET Core Web API with RFC Specification

Custom error responses in a .NET Core Web API provide better information to users and developers, making the application more efficient and user-friendly. Continue reading
-
Pipes and Filters Design Pattern: A Practical Approach

The pipes and filters pattern is a powerful tool for breaking down complex data processing tasks into simple, reusable components. It can help you write maintainable and reusable code that is easy to understand and modify. In this blog post, we have seen how to use the pipes and filters pattern to validate incoming data… Continue reading
-
Dynamic objects in C#

Dynamic objects in C# are objects that can have properties and methods added to them at runtime, as opposed to traditional objects which have a fixed set of properties and methods defined at compile time. There are a few different ways to create dynamic objects in C#, including the dynamic keyword and the ExpandoObject class. Continue reading
-
How to do polymorphic serialization/deserialization in C# System.Text.Json

In this blog post, you’ll see how to serialize and deserialize a hierarchy of objects polymorphically to have a cleaner json. Continue reading
