예제 #1
0
        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);
        }
예제 #2
0
파일: Product.ashx.cs 프로젝트: Eilon/spark
        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);
        }