Пример #1
0
        public ActionResult AddComment(SquawkCommentViewModel viewModel)
        {
            SquawkComment comment = new SquawkComment()
            {
                PostDate         = DateTime.Now,
                PostedByMemberId = ((AuthenticatedUser)Session[ContextVariables.AuthenticatedUser]).MemberId,
                SquawkId         = viewModel.SquawkId,
                Text             = viewModel.Text
            };

            _dataService.AddSquawkComment(comment);

            return(RedirectToAction("Details", new { id = viewModel.SquawkId }));
        }