public ActionResult DeleteConfirmed(int id) { SteerType steertype = db.SteerTypes.Find(id); db.SteerTypes.Remove(steertype); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "SteerTypeId,SteerTypeName")] SteerType steertype) { if (ModelState.IsValid) { db.Entry(steertype).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(steertype)); }
public ActionResult Create([Bind(Include = "SteerTypeId,SteerTypeName")] SteerType steertype) { if (ModelState.IsValid) { db.SteerTypes.Add(steertype); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(steertype)); }
// GET: /SteerType/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SteerType steertype = db.SteerTypes.Find(id); if (steertype == null) { return(HttpNotFound()); } return(View(steertype)); }
public SteerSettings(SteerType type, int interval) { Type = type; Interval = interval; }