I’ve recently been working on a small library for doing validation with lambda expressions. It allows you to run a set of validators against an object, then collects the validation errors in a list. Here are some examples:
var person = new Person();
var validator = Validator.For(person).Rules(
rule => rule.For(p => p.Forename).NotNull(), //Forename cannot be null
rule => rule.For(p [...]
I recently moved my blog to a virtual server purchased from 1and1. Here are some things I learned in the process:
Wordpress is really easy to install
Apache’s mod_proxy is very cool - I can use it to access both IIS and Apache through port 80
CssEdit is the best thing since sliced bread
Mark is much better at [...]
Update 13/09/08 I’ve posted a new version of the sample which is compatible with .NET 3.5 SP1. It can be found here.
One of the great things about ASP.NET MVC is the automatic databinding support for routing. For example, if you define a route like this:
routes.Add(new Route("{controller}/{action}/{id}", new MvcRouteHandler()) {
Defaults = new RouteValueDictionary(new { action = [...]
The end is nigh! I have joined twitter!
Version 2.6 of my favourite Object Relational Mapper, LLBLGen Pro, is now available.
The main addition to V2.6 is support for a full Linq provider, so writing queries in LLBLGen just became a lot easier. V2.6 also includes a new Prefetching API which I wrote during the 2.6 beta period, which Frans then included in the [...]