public override void Process() { var repos = new ProductRepository(); BaseView view = CreateView("productlist.spark", "master.spark"); view.ViewData["products"] = repos.ListAll(); view.RenderView(Context.Response.Output); }
public override void Process() { int id = Convert.ToInt32(Context.Request.Params["id"]); var repos = new ProductRepository(); BaseView view = CreateView("product.spark", "master.spark"); view.ViewData["product"] = repos.Fetch(id); view.RenderView(Context.Response.Output); }