Friday, April 17, 2009

DynamicData with ASP.NET MVC

Recently while browsing the web for interesting resources I've stumbled upon a blog entry talking about DynamicData. Since I've had no idea what that was I've dug a little bit into it and found out that it poses a fantastic opportunity to complement an otherwise complete site with a nice browser/editor for the whole database.

Since it was all nice and dandy I've dug a little bit more trying to integrate this technology with the ASP.NET MVC framework. And as it turns out there's a great example here that provides an end-to-end solution.

Since I've had some trouble running this example out-of-the-box I though I'd share what I've done to make it work:

1. Open the ~/Views/Shared/Site.Master
2. Add the following line right after the page declaration:

<%@ Import Namespace="System.Web.Mvc.Html" %>


That's it! Just hit F5 and observe the beauty of the DynamicData integrated with ASP.NET MVC :D

Have fun!

No comments: