Ensuring Proper JSON Serialization of Enum Values in C#A common issue arises when serializing enums to JSON: the default behavior often results in the enum values being represented as integers rather than their textual representations. This can lead to confusion and difficulty in understanding the data b...Feb 15, 2024·3 min read
Designing a Ride Hailing Service in .NET - Part 1 - Defining the domain modelsSep 25, 2023·8 min read
Implementing Caching in Web API: Memory Cache, Redis, and IDistributedCacheCaching is a crucial optimization technique for improving the performance and scalability of Web APIs. In this article, we'll explore various caching options available in .NET Web API, including in-memory caching, Redis caching, and using IDistribute...Sep 17, 2023·5 min read
Building a Global Error Handling Middleware in .NET Web APIError handling is a critical aspect of web application development. Whether it's handling unexpected exceptions, validating user input, or dealing with various types of errors gracefully, a well-structured error handling mechanism is essential. In .N...Sep 17, 2023·5 min read
Async/Await and Cancellation Tokens in C#Asynchronous programming has become an essential part of modern software development, allowing applications to perform tasks concurrently without blocking the main thread. In C#, the async and await keywords simplify asynchronous code, making it more...Sep 15, 2023·9 min read
A Comprehensive Guide to Using Dapper in C#Introduction Dapper is a lightweight and efficient Object-Relational Mapping (ORM) library for C#. Unlike other ORMs that can be complex and require significant configuration, Dapper is designed to be simple and straightforward. It provides a conveni...Sep 14, 2023·3 min read
Implementing Transactions in Entity Framework Core for Consistent Database OperationsIntroduction Database operations often involve multiple steps that need to be executed together to maintain data consistency. Entity Framework Core (EF Core) provides a robust way to manage transactions, ensuring that a series of database operations ...Sep 12, 2023·7 min read
Using CRUD Operations in Entity Framework with In-Memory Database in Web APIIf you are short on time, you can directly view the code repo here. Introduction In this article, we will go over how to implement CRUD operations in Web API with the help of Entity Framework. Furthermore, we will use the In Memory database provided ...Sep 10, 2023·14 min read