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))); }
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); }