Archive for the ‘Programming’ Category

Connecting to Azure Table Storage

After you finally manage to get Table Storage working (see nice tutorial here) you’ll try to deploy it to your staging environment. That means you need to change the configuration. There are three settings to use: AccountName, AccountSharedKey and TableStorageEndpoint. Unfortunately, the values you need for them aren’t what you would naturally expect. AccountName: This [...]

More »

Learning Windows Azure

I started to learn how to use the Azure Cloud Service from Microsoft this week. Currently it’s still in Tech Preview stage. Unfortunately you can tell that from the SDK documentation. Here’s some useful links to get you going: Screencasts: http://msdn.microsoft.com/en-us/azure/dd439432.aspx These are quite basic, but trust me, you need them to be basic to [...]

More »

C# Acrobatics : Lambdas and Expression Methods as a replacement for NVelocity

I’ve been very quiet recently. (I’m trying to not be so loud, Scott. ) You see, I’ve been writing a lot of ASP.Net code for a site I’m working on. And, to be honest, I’ve been having a lot of trouble. The source code for .Net has been very helpful, and I’ve learnt a lot [...]

More »

Design Guidelines for LINQ

Have you wondered if and when you should use the new LINQ features in .Net 3.5? Like, where should I put a new extension method? Should I use Func<T> or a custom delegate? How do I best implement a mix-in (extension methods on an interface)? Well, Mircea Trofin has just published a new draft of [...]

More »

Remove and Sort Those Ugly “using-Statements”

Visual Studio 2008 has lots of goodies in it, like LINQ syntax, CSS editing, and testing tools. There’s a lesser-known feature which I really appreciate though – the “Remove and Sort Usings” command in the C# editor. You activate the command by placing your cursor over the using statements and clicking on the right mouse-button.

More »

The LinqDataSource and the Hidden Viewstate

Yesterday I thought I’d learn about the LinqDataSource in ASP.Net 3.5, and got an interesting surprise. The new LinqDataSource can also be used with a LINQ-to-SQL model to perform updates. You simply add the DataSource to your page, set the table name, and set EnableUpdate to true. Then, using a standard DataControl, you can make [...]

More »

Writing Custom Exception Classes the Quick Way

Until recently I thought this was a well-known feature. After demonstrating it a few times, I found out it wasn’t. A long time ago, in an cubicle far, far away, someone created the .Net Framework. To cut a long story short, they simultaneously produced guidelines for creating Exception classes, which you should always use or [...]

More »