In modern software development, we are constantly told to follow the S.O.L.I.D principles. But in the real world, requirements grow, and classes quickly become “God Objects”—bloated files that handle business […]
Read MoreWhy You Should Use a Read-Only DbContext in addition to your normal DbContext
As .NET developers, we often reach for Entity Framework Core (EF Core) as our default data access layer. Typically, we spin up a single AppDbContext, register it in our Dependency […]
Read MoreFire and Forget: Mastering Asynchronous Background Processing in ASP.NET Core
One of the quickest ways to kill your API’s performance is to force the user to wait for things they don’t actually need to witness. If a user clicks “Register,” […]
Read MoreDo not returns null
If you create a method that return a list and you don’t have data, always return empty list instead of null. This would allow the caller to iterate the list […]
Read MoreC# Exception Handler
Given the code below, how would you add exception handling in your code? Some developer would handle like this While other do something like this Which style is more readable?
Read MoreStartup configure method
Did you know that you can inject any object in the Configure method of your startup class? For example if you want to inject ICustomer.
Read MoreDate and time arithmetics
One of our developer wrote this code He is combining the date and time but in a clumsy way. What he’s doing is composing a string then convert it to […]
Read More