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
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The framework most definitely accesses the model after it returns an
ActionResult.ActionResultshave theirExecute()methods called in order to generate the content.