public ActionResult Edit(Guid id)
 {
     var discussion = discussionsRepository.Read(id);
     var discussionModel = new DiscussionModel
         {
             Id = discussion.Id.ToString(),
             Title = discussion.Title,
             State = discussion.State.ToString()
         };
     return View("Edit", discussionModel);
 }
        private bool TryConvertDiscussionModelToDiscussion(DiscussionModel discussionModel, out Discussion discussion)
        {
            discussion = null;

            Guid id;
            if (!Guid.TryParse(discussionModel.Id, out id))
                return false;
            discussion = new Discussion
                {
                    Id = id,
                    Title = discussionModel.Title,
                    State = int.Parse(discussionModel.State)
                };
            return true;
        }