Programming

Why You Should Avoid Command Handlers Calling Other Commands? Members Public

One of the patterns that I keep coming back to when building ASP NET Applications is the Command Query Separation (CQS) pattern. Fundamentally, the pattern separates the code to read (Query) and the write (Command) to the data store. By separating the Commands and Queries, the code is more focused

Rahul Pulikkot Nath
Rahul Pulikkot Nath
Programming

Understand CORS and Learn How to Enable it for Your ASP NET API Members Public

Cross Origin Resource Sharing or CORS in short is a W3C standard that allows a server to relax the same-origin policy. Learn more about CORS, how to enable it for an ASP NET Web API, Preflight requests and more.

Rahul Pulikkot Nath
Rahul Pulikkot Nath
Dotnet

Migrating My Blog From Hugo To Gatsby Members Public

Migrating from Hugo to Gatsby

Rahul Pulikkot Nath
Rahul Pulikkot Nath
Programming

HOW TO: ZIP Multiple CSV Files In ASP.NET Members Public

Learn how to generate a ZIP file containing many CSV files in an ASP.Net Web API application. The same approach is useful to zip files of any type in any .NET application using CSharp.

Rahul Pulikkot Nath
Rahul Pulikkot Nath
Programming

Don't Let Entity Framework Fool Your Constructors! Members Public

Any state that an object can be in must be representable through the class constructor.

Rahul Pulikkot Nath
Rahul Pulikkot Nath
Programming

Back To Basics: Constructors and Enforcing Invariants Members Public

In C# or any class-based object-oriented language, a Constructor is used to create an object. The constructor is responsible for initializing the object's data members and establishing the class invariants. A constructor fails and throws an exception when the class invariants are not met. An invariant is an

Rahul Pulikkot Nath
Rahul Pulikkot Nath
Programming

TypeScript: Use Sum Types To Your Advantage When Modelling Data Members Public

Recently I was working at a client, and we had to take online payment for the service they provide. There were two options to pay - either in part or in full. When paying in full, the payment included a total amount and a refundable amount. When paying in partial,

Rahul Pulikkot Nath
Rahul Pulikkot Nath
Programming

Rename SQL Table and Update Naming Conventions for Associated Keys and Constraints Members Public

At work, we usually DbUp changes to SQL Server. We follow certain naming conventions when creating table constraints and Indexes. Here is an example create table Product ( Id uniqueidentifier not null unique, CategoryId uniqueidentifier not null, VendorId uniqueidentifier not null, constraint PK_Product primary key clustered (Id), constraint FK_Product_

Rahul Pulikkot Nath
Rahul Pulikkot Nath
Programming