public ActionResult DeleteConfirmed(long id) { LocationViewType locationViewType = db.LocationViewTypes.Find(id); db.LocationViewTypes.Remove(locationViewType); db.SaveChanges(); return(RedirectToAction("Index")); }
public static APILocationViewType fromLocationViewType(LocationViewType sourceLocationViewType) { APILocationViewType result = new APILocationViewType(); result.ID = sourceLocationViewType.ID; result.Title = sourceLocationViewType.Title; return(result); }
public ActionResult Edit([Bind(Include = "ID,Title")] LocationViewType locationViewType) { if (ModelState.IsValid) { db.Entry(locationViewType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(locationViewType)); }
public ActionResult Create([Bind(Include = "ID,Title")] LocationViewType locationViewType) { if (ModelState.IsValid) { db.LocationViewTypes.Add(locationViewType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(locationViewType)); }
// GET: LocationViewTypes/Edit/5 public ActionResult Edit(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } LocationViewType locationViewType = db.LocationViewTypes.Find(id); if (locationViewType == null) { return(HttpNotFound()); } return(View(locationViewType)); }