public ActionResult Create(NewsItem newsitem)
 {
     //Set author to person logged in
     newsitem.Author = db.GetUserFromMember(Membership.GetUser()).DisplayName;
     newsitem.AuthorID = db.GetUserFromMember(Membership.GetUser()).Id;
     db.NewsItems.Add(newsitem);
     db.SaveChanges();
     return RedirectToAction("Index");
 }
 public ActionResult Edit(NewsItem newsitem)
 {
     if (ModelState.IsValid)
     {
         db.Entry(newsitem).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(newsitem);
 }