Mad Props!

Omniscience is just a Google-search away.

Login

You're reading Mabsterama, the weblog of Matt Hamilton. Enjoy your stay.

Blog

Type Alias Quirk

Scott Hanselman tweeted this afternoon about it being a drag using a type like this: List < KeyValuePair < String , Func < Brush , UserControl >>> It's certainly a complex type with all those nested generics. My first instinct, apart from deriving new non-generic classes from the generic...

Continue reading →

AWDNUG July

Last night's meeting of the Albury/Wodonga .NET User Group was a little bit different - we held it at the local pub and combined the meeting with a geek dinner. The meeting was the third in our Heroes Happen Here series, in which we look at the 2008 line of products from Microsoft. We've already looked...

Continue reading →

Ex Machina

Just finished volume one of Ex Machina , by Brian K Vaughan. As a big fan of Y: The Last Man I figured I'd like this one, and I was right. The story revolves around Mitchell Hundred, the mayor of New York City who, in a previous life, was a crime-fighting super hero. His power: he can talk to machines...

Continue reading →

Another IDbCommand Extension - Fill

I'm on a roll creating extension methods for IDbCommand, so here's another one. Quite often we see this pattern when reading from a command: using ( var rdr = cmd.ExecuteReader()) { while (rdr.Read()) { var thing = new Thing () { Date = rdr.GetDateTime(0), Foo = rdr.GetInt32(1) }; things.Add(thing);...

Continue reading →

Adding IDbCommand Parameters with Anonymous Types

To take my previous post to the next level, I decided to try a different approach to adding parameters to an IDbCommand by using anonymous types. This is inspired by the way you set up routes in ASP.NET MVC, and example of which you can see here on ScottGu's blog . The idea is that you simply pass in...

Continue reading →

AddWithValue via Extension Methods

On a recent .NET Rocks panel show, Ayende complained that the abstract classes to access databases (for example, IDbCommand) were lacking some fundamental pieces that make the concrete classes (eg SqlCommand) easier to use. The example he cited was the AddWithValue method, to quickly add a parameter...

Continue reading →

Moq Triqs - Successive Expectations

I've posted this to the Moq discussion forum but I think it warrants its own post here too. One of the (very minor) limitations we struck with Moq if that if you expect to call the same method more than once and get a different result each time, there's no straight forward way to set that up. If you...

Continue reading →

Sharing Membership between Community Server and Graffiti

A little tip if you've followed Dan Bartels' excellent guide to setting up shared ASP.NET membership with Graffiti : Something that Graffiti requires (at least version 1.1 does) is that all users are a member of the "gEveryone" role. If you read my earlier post about logging in you'll remember that I...

Continue reading →

A Custom 404 Page for Graffiti

Have you seen a 404 error on madprops.org? I hope not. But if you have, you would have noticed that it's not the default 404 page that your browser normally shows. After re-reading Jeff Atwood's post about custom 404 errors , and seeing the great job Dave did on his when he migrated to BlogEngine.NET...

Continue reading →

Please Fix ASAP

An interesting little story from work today. Late last week we had a call from the feedmill, telling us that a program they run which lets them view reports had stopped working. Upon closer investigation it seemed that the program used an embedded WebBrowser control to hit a local SQL Server Reporting...

Continue reading →