// // GET: /Post/Create?TopicId=1234..7890 // GET: /Post/Create?TopicId=1234..7890&ParentId=4312..0987 public ViewResult Create(Guid topicId, Guid? parentId) { var topic = _topicRepository.FindBy(topicId); var post = new Post {Topic = topic}; if (parentId.HasValue) { post.Parent = _postRepository.FindBy(parentId.Value); } var input = new PostToInputMapper().Map(post); return View(input); }
// // GET: /Post/Edit/5432..7890 public ActionResult Edit(Guid id) { var post = _postRepository.FindBy(id); var input = new PostToInputMapper().Map(post); return View(input); }