Easily Apply Sorting for DataTables.js in C#

Introduction

I recently started using https://datatables.net/ for my front-end development and quickly discovered that writing switch statements and for-each loops to handle the sorting requirements just wasn't good enough.

So I wrote this little helper method to shorten the sorting configuration.

Background

I've created some classes to represent DataTables' structures. They are listed below: