public ActionResult Edit(Model.Model.Country country) { if (ModelState.IsValid) { _CountryService.Update(country); return(RedirectToAction("Index")); } return(View(country)); }
// // GET: /Country/Delete/5 public ActionResult Delete(long id) { Model.Model.Country country = _CountryService.GetById(id); if (country == null) { return(HttpNotFound()); } return(View(country)); }
public ActionResult Create(Model.Model.Country country) { // TODO: Add insert logic here if (ModelState.IsValid) { _CountryService.Create(country); return(RedirectToAction("Index")); } return(View(country)); }
public ActionResult Delete(long id, FormCollection data) { Model.Model.Country country = _CountryService.GetById(id); _CountryService.Delete(country); return(RedirectToAction("Index")); }