public ActionResult Create()
        {
            BlogPost bp = new BlogPost();

            return View(bp);
            //return View();
        }
        public ActionResult Create(BlogPost blogpost)
        {
            if (ModelState.IsValid)
            {

                UserProfile currentUser = db.UserProfiles.Find(WebSecurity.CurrentUserId);
                blogpost.User = currentUser;
                blogpost.PostDate = DateTime.Now;

                db.BlogPosts.Add(blogpost);

                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(blogpost);
        }
 public ActionResult Edit(BlogPost blogpost)
 {
     if (ModelState.IsValid)
     {
         db.Entry(blogpost).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(blogpost);
 }