Posted by
Barry Jones
in
.NET, Development, MVC
Oct 12th, 2009
|
No Comments
Here is a quick way of getting detailed information about which route has been accepted and why in MVC.NET.
The code below should be placed in your Application_EndRequest event handler in global.asax. By placing a break point in the code directly after evaluation you can see a collection of all the routes, if it matched the request and a reference to the RouteData to see more detailed information.
This code works by re-evaluating each of the Routes defined in your application against the current request. The first match in the collection is the match that MVC will have used to handle your request....
Posted by
Barry Jones
in
.NET, Development, My Projects
Oct 8th, 2009
|
No Comments
I had nothing else to talk about so I thought I would give a little ramble on my current project. It has been ‘code named’ Live Documenter, which will probably end up being its final name as well – if only I was more creative. OK, onward!
Basically since NDoc curled up and died a long time ago I have really wanted a nice xml comment documenter to read all those lovely comments I have been painstakingly hand crafting since , well, as long as I can remember. This has been curled up at the back of mind for ages. And a little while ago I decided I would start faffing around with the .NET...
Posted by
Barry Jones
in
.NET, Development, Patterns
Oct 6th, 2009
|
No Comments
The lowly DTO, a pattern described by Martin Fowler that enables you to reduce the number of API calls you make across a remote boundary; it allows this by grouping all the data in to a new data type and returning that instead. I have however found that this pattern can cause you to write a lot of code that is nothing more than property setting. The code provided in this post (here) allows you to automate the population of these DTOs saving you time, so you can get on with something more important like drinking coffee....