bradygaster.com

fewer resources, less time, more features

JsonResult Extension Method

January 15 2010
Posted to: ,

Mildly silly and maybe making too many assumptions though it is, I worked up a little extension method to generically evaluate (and return) the Data property of a JsonResult class. Makes life a little easier when testing JsonResult action methods on controller instances.

image

Helps during testing, for sure. See below for a demonstration of how I’m using this in a pet project.

image

Comments Email Permalink Bookmark and Share kick it

Comments