Musings on code and life
06/25/2015 - Entity Framework ExecutableLogFormatter
One of the things that annoys me about Entity Framework 6 logging is that it doesn't output the parameters to the sql statement in a way that can be easily executed in Sql Server if you want to test it out. So I wrote this simple ExecutableLogFormatter that outputs the sql and parameters in an executable format.
06/23/2015 - Entity Framework Migrations AddIfNotExist
I normally use the Entity Framework Migrations IDbSet extension method AddOrUpdate, however I had a need to only add a record if it didn't exist so I created this simple AddIfNotExist extension method.
I am currently working on writing our build scripts in LinqPad and was looking into ways to start and stop Windows Services on a remote machine.
12/16/2014 - Display Amazon Instances
We use a *lot* of AWS servers and I put together a simple Razor Webpage that would display all of the Amazon instances for a given AccessKey and SecretKey.
08/12/2014 - PowerShell Random Number Generator
I needed a small script that would print all the numbers within a given range randomly for giveaways at a user group so I threw this PowerShell script together.
06/25/2014 - Find Record Query
I put together a SQL query that can find a given record in a database given you know the Id, but don't know which table it goes with. I hope I'll never need this again, but you never know.
06/24/2014 - Find Table Query
I was looking for some sql that would make it easy to find a sql table matching on part of the name, database, or schema.
06/24/2014 - PowerShell deployment
I've been playing around with using PowerShell to do some automated deployment. I'm posting the script if it might help anyone else, though I have to admit I'm new at powershell.
06/24/2014 - Find Columns Query
I cobbled together some sql that would let me find a column in any database within a given Sql Server instance
03/06/2014 - How to log nHibernate using log4net
I spent some time today figuring out how to get nHibernate working with log4net so I'm posting the steps that ended up working for me here.