public JsonResult AddComment(int inquiryId, string text)
{
var inquiry = repository.Get<Inquiry>(inquiryId);
if (inquiry == null)
{
throw new ModelIsNotValidException();
}
var comment = new Comment
{
Date = Clock.Now,
Text = text
};
inquiry.Comments.Add(comment);
repository.Save(inquiry);
return Json(new {date = comment.Date, txt = comment.Text});
}