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
-
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
-
Using ConfigureServices to Inject Custom Services into the Configure Method in ASP.NET Core

Unlock the power of ASP.NET Core’s dependency injection system by injecting custom services directly into the Configure method. Dive deep into practical examples that showcase dynamic configuration, promoting clean coding practices, and enhancing application flexibility. Whether you’re a seasoned .NET developer or just getting started, this guide will shed light on a lesser-known yet incredibly… Continue reading
-
Understanding the Difference Between Threads and Tasks in C#

Concurrency and parallelism have become pivotal aspects of modern programming, allowing developers to harness the power of multicore processors and deliver more responsive applications. In the realm of C#, two main avenues for achieving these goals are threads and tasks. While both are tools for enabling concurrency, they operate differently and offer distinct advantages, each… Continue reading
Async/Await, Asynchronous Programming, C# Concurrency, C# Programming, Code Efficiency, Concurrency, CPU-Bound Tasks, Developer Productivity, I/O-Bound Tasks, Multithreading, Parallel Execution, Parallelism, performance optimization, Programming Abstractions, Synchronization, System Resources, Task Parallel Library, Task Scheduler, Thread Management, Thread vs Task -
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
-
Unraveling the Tapestry of Code Complexity: Exploring the Web of Small Things

In the world of software development, code complexity can emerge from numerous small details that interconnect within our codebases. It goes beyond grand architectural designs and intricate algorithms. The countless magic numbers, nested conditionals, poor naming choices, and other seemingly insignificant elements contribute to a web of complexity. In this blog, we unravel these small… 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
-
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

