public ActionResult DeleteConfirmed(int id) { RSSUrlModel rSSUrlModel = db.RSSUrlModels.Find(id); db.RSSUrlModels.Remove(rSSUrlModel); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,Name,Url,CreateDate")] RSSUrlModel rSSUrlModel) { if (ModelState.IsValid) { db.Entry(rSSUrlModel).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(rSSUrlModel)); }
public ActionResult Create([Bind(Include = "ID,Name,Url,CreateDate")] RSSUrlModel rSSUrlModel) { if (ModelState.IsValid) { db.RSSUrlModels.Add(rSSUrlModel); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(rSSUrlModel)); }
// GET: RSSUrl/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RSSUrlModel rSSUrlModel = db.RSSUrlModels.Find(id); if (rSSUrlModel == null) { return(HttpNotFound()); } return(View(rSSUrlModel)); }