Skip to content

Instantly share code, notes, and snippets.

@mikeedwards83
Created April 30, 2015 15:11
Show Gist options
  • Select an option

  • Save mikeedwards83/0758788d985ddab236a9 to your computer and use it in GitHub Desktop.

Select an option

Save mikeedwards83/0758788d985ddab236a9 to your computer and use it in GitHub Desktop.
ProductController.cs for Glass.Mapper.Sc Workbook
public class ProductController : GlassController
{
public List<Product> Basket
{
get
{
if (HttpContext.Session["ProductBasket"] == null)
{
HttpContext.Session["ProductBasket"] = new List<Product>();
}
return HttpContext.Session["ProductBasket"] as List<Product>;
}
}
[HttpGet]
public ActionResult Add()
{
}
[HttpPost]
public ActionResult Add(Add view)
{
}
protected void SetupViewAdd(Add view)
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment