public ActionResult DeleteConfirmed(int id)
        {
            ref_Municipality ref_Municipality = db.ref_Municipality.Find(id);

            db.ref_Municipality.Remove(ref_Municipality);
            db.SaveChanges();
            return(RedirectToAction("Create"));
        }
 public ActionResult Edit([Bind(Include = "MunicipalityID,countryID,regionID,provinceID,Municipality,zipcode")] ref_Municipality ref_Municipality)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ref_Municipality).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Create"));
     }
     return(View(ref_Municipality));
 }
        public ActionResult Create([Bind(Prefix = "Item1", Include = "MunicipalityID,countryID,regionID,provinceID,Municipality,zipcode")] ref_Municipality ref_Municipality)
        {
            if (ModelState.IsValid)
            {
                db.ref_Municipality.Add(ref_Municipality);
                db.SaveChanges();
                return(RedirectToAction("Create"));
            }

            return(View(ref_Municipality));
        }
        // GET: Municipalities/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ref_Municipality ref_Municipality = db.ref_Municipality.Find(id);

            if (ref_Municipality == null)
            {
                return(HttpNotFound());
            }
            return(View(ref_Municipality));
        }