Skip to content

Instantly share code, notes, and snippets.

@mikeedwards83
Created July 3, 2018 07:03
Show Gist options
  • Save mikeedwards83/61549efae1254dc83e652bc3d76114d2 to your computer and use it in GitHub Desktop.
Save mikeedwards83/61549efae1254dc83e652bc3d76114d2 to your computer and use it in GitHub Desktop.
public class Demo
{
public virtual Guid Id { get; set; }
public virtual string Title { get; set; }
public virtual DateTime Date { get; set; }
public virtual string Url { get; set; }
}
public class DemoController : Controller {
public ActionResult Index(){
var mvcContext = new MvcContext();
var model = mvcContext.GetCurrentItem<Demo>();
var url = model.Url;
return View(model);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment