public ActionResult Create(FormCollection collection, Restaurant newRestaurant) { if (!ModelState.IsValid) { return View(newRestaurant); } client.Index(newRestaurant); return RedirectToAction("Index"); }
public ActionResult Edit(string wikiurl, FormCollection collection, Restaurant restaurant, string tags) { if (!ModelState.IsValid) { return View(restaurant); } if (!string.IsNullOrWhiteSpace(tags)) { restaurant.Tags = tags.Split(',').Select(x => x.Trim()).ToList(); } client.Index(restaurant); return RedirectToAction("Index"); }