public ActionResult DeleteConfirmed(int id) { SoftwareLicensing softwareLicensing = db.SoftwareLicensings.Find(id); db.SoftwareLicensings.Remove(softwareLicensing); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "SLID,SoftwareName,Owner,Cost")] SoftwareLicensing softwareLicensing) { if (ModelState.IsValid) { db.Entry(softwareLicensing).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(softwareLicensing)); }
public ActionResult Create([Bind(Include = "SLID,SoftwareName,Owner,Cost")] SoftwareLicensing softwareLicensing) { if (ModelState.IsValid) { db.SoftwareLicensings.Add(softwareLicensing); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(softwareLicensing)); }
// GET: SoftwareLicensings/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SoftwareLicensing softwareLicensing = db.SoftwareLicensings.Find(id); if (softwareLicensing == null) { return(HttpNotFound()); } return(View(softwareLicensing)); }