Пример #1
0
        public OperationStatus SaveComment(Comment comment)
        {
            try
            {
                comment.IsApproved = !_siteSettingsService.GetSiteSettings().ModerateComments;
                comment.Created = DateTime.Now;
                CommentRepository.SaveComment(comment);
            }
            catch (Exception ex)
            {
                return new Failure(ex.Message);
            }

            return new Success();
        }
Пример #2
0
        public void SaveComment(Comment comment)
        {
            CUDQuery query = session => session.Save(comment);

            QueryExecutor.UpdateDelete(query);
        }