Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            RSSUrlModel rSSUrlModel = db.RSSUrlModels.Find(id);

            db.RSSUrlModels.Remove(rSSUrlModel);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
        // 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));
        }