コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            UbicationFeature ubicationFeature = db.UbicationFeatures.Find(id);

            db.UbicationFeatures.Remove(ubicationFeature);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "UbicationFeatureId,Description")] UbicationFeature ubicationFeature)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ubicationFeature).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(ubicationFeature));
 }
コード例 #3
0
        public ActionResult Create([Bind(Include = "UbicationFeatureId,Description")] UbicationFeature ubicationFeature)
        {
            if (ModelState.IsValid)
            {
                db.UbicationFeatures.Add(ubicationFeature);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(ubicationFeature));
        }
コード例 #4
0
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            UbicationFeature ubicationFeature = db.UbicationFeatures.Find(id);

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