Programming
Why You Should Avoid Command Handlers Calling Other Commands? Paid 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
Understand CORS and Learn How to Enable it for Your ASP NET API Paid 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.
Migrating My Blog From Hugo To Gatsby Paid Members Public
Migrating from Hugo to Gatsby
HOW TO: ZIP Multiple CSV Files In ASP.NET Paid 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.
Don't Let Entity Framework Fool Your Constructors! Paid Members Public
Any state that an object can be in must be representable through the class constructor.
Back To Basics: Constructors and Enforcing Invariants Paid 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
TypeScript: Use Sum Types To Your Advantage When Modelling Data Paid 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,
Rename SQL Table and Update Naming Conventions for Associated Keys and Constraints Paid 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_