public ActionResult DeleteConfirmed(int id)
        {
            BlogSingle blogSingle = db.BlogModels.Find(id);

            db.BlogModels.Remove(blogSingle);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Title,Body,Date,ByPerson,Note,ByPersonNote")] BlogSingle blogSingle)
 {
     if (ModelState.IsValid)
     {
         db.Entry(blogSingle).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(blogSingle));
 }
        public ActionResult Create([Bind(Include = "Id,Title,Body,Date,ByPerson,Note,ByPersonNote")] BlogSingle blogSingle)
        {
            if (ModelState.IsValid)
            {
                db.BlogModels.Add(blogSingle);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(blogSingle));
        }
        // GET: Admin/BlogSingles/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BlogSingle blogSingle = db.BlogModels.Find(id);

            if (blogSingle == null)
            {
                return(HttpNotFound());
            }
            return(View(blogSingle));
        }