Month: March 2010

Using Powershell to apply new C# field naming conventions

I recently found myself wanting to rename all the fields in several large projects to conform to a new naming scheme.  Sadly Resharper was not helpful here, so I turned to a combination of Regex and Powershell.  Our team has recently revised our 7 year-old coding guidelines.  One of the guidelines that was changed concerned…

Read MoreView 67 Comments

Client-Side Validation with ASP.NET MVC 2.0 Futures

Just a quick post to hopefully save others some time.  ASP.NET MVC 2.0 has built-in support for client-side validation, but it doesn’t work with the expression-based BeginForm HtmlHelper methods that are available in the ASP.NET MVC Futures assembly.  I also don’t like that I have to call a separate helper method to set my form…

Read MoreView 16 Comments

Vote for me at CodeStock!

Voting is now open for CodeStock 2010 sessions!  I have three sessions submitted this year.  If you live in the Southeast, this conference is a real steal.  Early registration is just $55.  That’s $55 for a two-day conference, “buffet style” lunches, and a shirt.  Not bad!  If you register early, please consider voting for my…

Read MoreView 4 Comments

Two things missing from C#

While building some ugly code to walk the Lucene.NET Query graph, I found myself needing two bits of functionality from C# that it sadly doesn’t provide.  There are arguments for and against each of these, but they certainly would have saved me some pain today. Switching off of System.Type The Lucene query graph is a…

Read MoreView 9 Comments

A troublesome brew: NHibernate + FluentNHibernate + SQLite on .NET 4.0

Mixing NHibernate, Fluent NHibernate, and SQLite on .NET 4.0 RC will lead to some major headaches.  There’s an easy fix, but it doesn’t work if you are using Resharper’s test runner.  If you’re using my personal favorite test runner, TestDriven.NET though, the fix is actually quite easy.  We decided to use .NET 4.0 for the…

Read MoreView 36 Comments