Friday April 29th

Thursday April 28th

Wednesday April 27th

3 Kicks

Creating a generic Linq to SQL ModelBinder for the ASP.NET MVC framewo

How about this action method, using a Person class which is a Linq to SQL entity type. It accepts a Person object as a parameter. The Person class is a Linq to SQL entity type. It's cleaner not to use the Linq to SQL data context here! Using the ASP.NET MVC ModelBinder infrastructure, I am actually able to bind action method parameters to real objects, based on simple query string parameters like, in this case, id. A custom ModelBinder maps this string id to a real Person instance from my Linq to SQL DataContext. Let me show you how I've created this ModelBinder.

0 comments

Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network