// GET: Posts/MessageDetails/5
        public ActionResult MessageDetails(int? id)
        {
            if (id == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }

            Post post = db.Posts.Find(id);

            if (post == null)
            {
                return HttpNotFound();
            }

            post.Read = true;

            // Create view model
            ReceivedPostDetailsViewModel readPostDTO = new ReceivedPostDetailsViewModel();
            readPostDTO.Id = post.Id;
            readPostDTO.Subject = post.Subject;
            readPostDTO.Timestamp = post.Timestamp;
            readPostDTO.Message = post.Message;

            db.SaveChanges();
            return View(readPostDTO);
        }
        // GET: Posts/Delete/5
        public ActionResult Delete(int? id)
        {
            if (id == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }

            Post post = db.Posts.Find(id);

            ReceivedPostDetailsViewModel returnPost = new ReceivedPostDetailsViewModel();

            returnPost.Id = post.Id;
            returnPost.Message = post.Message;
            returnPost.Subject = post.Subject;
            returnPost.Timestamp = post.Timestamp;

            if (post == null)
            {
                return HttpNotFound();
            }
            return View(returnPost);
        }