Programming

Comparing List Objects

Comparing objects between 2 different lists to determine which have different properties. I have a list of EventType objects with the following definition. public class EventType { public int EventTypeId { get; set; } public string EventTypeDesc { get; set; } public DateTime CreateDate { get; set; } public int Read more…

By Shinigami, ago
Programming

HTML Checkbox Switches

HTML checkbox switches I’ve been using Switchery in various sites to make nice looking checkboxes, however whilst browsing the projects GitHub issues I spotted one post that said it was possible to replicate it’s functionality using pure CSS (though possibly at the cost of browser compatibility). This seems to work Read more…

By Shinigami, ago
Programming

SqlDataReader Null Handling

SqlDataReader null handling When reading values from a SqlDataReader in .NET null SQL values will cause the reader to error. I used to have an explicit null check around each column, however as this involved quite a bit of code duplication I had a look for something better and found Read more…

By Shinigami, ago
Programming

WordPress on Azure

WordPress on Azure Setting up a WordPress site on Azure using SQL rather than MySQL as the backend. I recently migrated this blog over to WordPress from BlogEngine.NET as BlogEngine.NET seems to have been abandoned. In the process of setting up WordPress I discovered that the backend database is MySQL, Read more…

By Shinigami, ago
Programming

Decimal to Hexadecimal in SQL

Conversion of decimals to hexadecimals in SQL While trying to convert some integers to hex values in SQL I found a few options that worked on ints and bigints but nothing that worked on anything larger and as I was needing to convert some integers of datatype decimal(20) I created Read more…

By Shinigami, ago
Programming

appsettings.json in .NET Core Console App

Adding appsettings.json to a .NET Core console app This is something that strangely doesn’t seem to be that well documented and took me a while to figure out though in the end it’s pretty simple. All that’s required is to add the following NuGet packages and an appsettings.json file. Microsoft.Extensions.Configuration Read more…

By Shinigami, ago