blog.seandrew.infoDesigning a SOLID, Layered ASP.NET Core Solution for Patient LookupA simple patient lookup might not sound exciting, but it is a perfect chance to show how clean code and solid architecture make all the difference. This example uses ASP.NET Core and stored procedures to do just that. While the use case is straightfo...Jul 30, 2025·8 min read
blog.seandrew.infoRefactoring Repetitive Model Validation in ASP.NET CoreIn one of my ASP.NET Core APIs, I was working with [FromBody] models that had a number of required fields, some were nullable integers, others were strings that needed to be non-empty. Initially, I handled validation directly in the controller action...Jul 16, 2025·5 min read
blog.seandrew.infoTransitioning to JSON: Supporting Both Body and Query Parameters in ASP.NET CoreRecently, I was tasked with updating older POST endpoints to support [FromBody] input instead of the traditional [FromQuery] model. As part of this transition, I needed to support both [FromQuery] and [FromBody] inputs for backward compatibility unti...Jul 14, 2025·10 min read
blog.seandrew.infoSQL Server Stored Procedure Design for Flexible Record LookupWhen working with data I often run into situations where the available information varies. Sometimes I get a clean patientid, which makes the lookup easy. Other times, all I have is a date of birth and ZIP code or even just an invoice number from bil...Jul 10, 2025·5 min read
blog.seandrew.infoDynamic API Dispatching in C#When building an API, one of the first things you need to figure out is how to route incoming requests to the right piece of code. This is usually done by checking which fields are present in the request and deciding which method to run. For simple A...Jun 24, 2025·6 min read