by clintmcmahon | May 6, 2022 | ASP.NET, C#
Today I had a requirement to calculate someone’s age based on that person’s birthday. It seems like a pretty simple function to write, but I decided to Google around a little bit anyway to see if what other people were doing to calculate age based on...
by clintmcmahon | Jan 15, 2021 | ASP.NET, C#, Code
I’m working on a new .Net Core 5 web app with user authentication where I need to customize some of the Identity account pages (Login, Register, Forgot Password, etc). Out of the box these pages are built into .Net Core so there’s nothing you need to do to...
by clintmcmahon | Jul 6, 2020 | Code, C#
In computer programming, unit testing is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine whether...
by clintmcmahon | Feb 7, 2020 | Code, ASP.NET, C#
This is an example of how to convert a generic list to a dynamic downloadable .csv file using C#, the CsvHelper library and the FileStreamResult. Download the repo and run the full project solution from Github In this example a request comes into the controller, we...