public ActionResult DeleteConfirmed(Guid id) { PipeProfile pipeProfile = db.PipeProfiles.Find(id); db.PipeProfiles.Remove(pipeProfile); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Name")] PipeProfile pipeProfile) { if (ModelState.IsValid) { db.Entry(pipeProfile).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View("~/Areas/Commerce/Views/ProductsRelated/PipeProfiles/Edit.cshtml", pipeProfile)); }
public ActionResult Create([Bind(Include = "Id,Name")] PipeProfile pipeProfile) { if (ModelState.IsValid) { pipeProfile.Id = Guid.NewGuid(); db.PipeProfiles.Add(pipeProfile); db.SaveChanges(); return(RedirectToAction("Index")); } return(View("~/Areas/Commerce/Views/ProductsRelated/PipeProfiles/Create.cshtml", pipeProfile)); }
// GET: Commerce/PipeProfiles/Delete/5 public ActionResult Delete(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PipeProfile pipeProfile = db.PipeProfiles.Find(id); if (pipeProfile == null) { return(HttpNotFound()); } return(View("~/Areas/Commerce/Views/ProductsRelated/PipeProfiles/Delete.cshtml", pipeProfile)); }