public ActionResult DeleteConfirmed([Bind(Include = "READERID,WRITERID")] ATTENTION aTTENTION) { db.ATTENTION.Remove(aTTENTION); db.SaveChanges(); WRITER wRITER = db.WRITER.Find(aTTENTION.WRITERID); wRITER.NUMFANS = wRITER.NUMFANS - 1; return(RedirectToAction("Index")); }
// GET: ATTENTIONs/Delete/5 public ActionResult Delete([Bind(Include = "READERID,WRITERID")] ATTENTION a) { ATTENTION aTTENTION = db.ATTENTION.Find(a); if (aTTENTION == null) { return(HttpNotFound()); } return(View(aTTENTION)); }
public ActionResult Create([Bind(Include = "READERID,WRITERID")] ATTENTION aTTENTION) { if (ModelState.IsValid) { db.ATTENTION.Add(aTTENTION); db.SaveChanges(); WRITER wRITER = db.WRITER.Find(aTTENTION.WRITERID); wRITER.NUMFANS = wRITER.NUMFANS + 1; return(RedirectToAction("Index")); } return(View(aTTENTION)); }