public ActionResult DeleteConfirmed(int id) { CountryT countryT = db.CountryT.Find(id); db.CountryT.Remove(countryT); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "countryid,countryname")] CountryT countryT) { if (ModelState.IsValid) { db.Entry(countryT).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(countryT)); }
public ActionResult Create([Bind(Include = "countryid,countryname")] CountryT countryT) { if (ModelState.IsValid) { db.CountryT.Add(countryT); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(countryT)); }
// GET: CountryTs/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CountryT countryT = db.CountryT.Find(id); if (countryT == null) { return(HttpNotFound()); } return(View(countryT)); }