asp.net mvc - Get result from an ActionResult directly in the controller -


i want able result actionresult generate directly in controller debugging purposes. how do that?

something like:

public actionresult parts(string id) {     var parts = _repository.getparts(id);     var action = json(parts);      var generatedjson = xxxxx;      return action; } 

for debugging purposes want use debugging tool such firebug or fiddler, if insist pollutingmodifying source code when in debug mode take @ javascriptserializer class (which internally used jsonresult class):

var generatedjson = new javascriptserializer().serialize(parts); 

Comments

Popular posts from this blog

haskell - Using filter on an item in a list? -

c# - When does PreApplicationStartMethod actually get triggered to run? -

c# - Binding attached property to IEnumerable -