Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mikeedwards83/ccbbb761835d83dd78d7b910a9897e26 to your computer and use it in GitHub Desktop.
Save mikeedwards83/ccbbb761835d83dd78d7b910a9897e26 to your computer and use it in GitHub Desktop.
public class CodeQuiz1
{
public virtual IEnumerable<CodeQuiz1> Children { get; set; }
public virtual string Title { get; set; }
public virtual ParentModel Parent { get; set; }
public string Name { get; }
}
public class ParentModel { }
//code from controller
public ActionResult Index()
{
var mvcContext = new WebFormsContext();
var model = mvcContext.GetContextItem<CodeQuiz1>(x => x.CacheEnabled());
return View(model);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment