Single or Array Enum JSON Converter

Single or array enum JSON converter. In addition to the SingleOrArrayConverter mentioned previously I’ve also created a version to translate enums to/from JSON using the name of the enum rather than it’s value as is the default. public class SingleOrArrayEnumConverter<T> : JsonConverter { public override bool CanConvert(Type objectType) { return Read more…

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…

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…

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…

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…