public ActionResult Create()
        {
            // create sample category
            Category category = sampler.CreateSampleCategory();

            service.SaveCategory(category);
            string message = string.Format("Added {0} product", category.Name);

            return(this.RedirectToAction(c => c.Index(message)));
        }
Пример #2
0
        public void Create()
        {
            // create sample category
            Category category = sampler.CreateSampleCategory();

            service.SaveCategory(category);
            string message = string.Format("Added {0} product", category.Name);

            RedirectToAction("index", "message=" + message);
        }