예제 #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);
        }