private Create ( |
||
comment | ||
리턴 | System.Web.Mvc.ActionResult |
public ActionResult Create(Comment comment)
{
commentsRepository.Save(comment);
return RedirectToAction("Index", "Home");
}
public void CreateController() { repository = new Mock<ICommentsRepository>(); controller = new CommentsController(repository.Object); result = controller.Create(comment); }