Is the following code sane?
public ActionResult MyController()
{
using(var model=new MyControllerModel())
{
return View(model);
}
//does framework access model after this point?
//If so, I need to rethink
}
Is the following code sane?
public ActionResult MyController()
{
using(var model=new MyControllerModel())
{
return View(model);
}
//does framework access model after this point?
//If so, I need to rethink
}
The framework most definitely accesses the model after it returns an ActionResult. ActionResults have their Execute() methods called in order to generate the content.