Automatically Log All SQL Commands

Over the last two days I’ve written code that automatically logs all SQL commands (database queries, invocations of stored procedures, etc) in MadPoker, my reference application. If you wish to skip the backstory, go directly to the solution. Reference Application What do I mean by “reference application”? I intend to spend time in the near future learning AngularJS, the client-side JavaScript framework used by my new employer. I’ve always been stronger on server-side development, so I’m excited to improve my client-side programming skills. I plan to write code to convince myself I understand AngularJS concepts and syntax as I read […]

The Best Domain-Specific Language for Manipulating Data is SQL

Motivation I’m not a fan of Microsoft’s Language Integrated Query (LINQ). But ranting about a language feature is an ineffective way to convince programmers of the merits of other techniques. So decided to construct a detailed example that illustrates how LINQ solves a certain problem, contrast it with a different technique, then highlight the deficiencies of LINQ and extol the virtues of my preferred technique. I happily set about creating a relational database and C# object model, then hit an impasse. When the time came to determine how to write LINQ code that maps the relational data into the C# […]