/// <summary> /// SaveContentComment /// </summary> /// <param name="contentComment"></param> public void SaveContentComment(ContentCommentModel contentComment) { ContentCommentDC contentCommentDC = Mapper.Map <ContentCommentModel, ContentCommentDC>(contentComment); ServiceResponse <int> saveContentCommentResponse = _contentProxy.Execute(opt => opt.SaveContentComment(contentCommentDC)); if (saveContentCommentResponse.Status != ResponseStatus.Success) { HandleError(saveContentCommentResponse.Status, saveContentCommentResponse.ResponseMessage); } else { contentComment.ContentCommentId = saveContentCommentResponse.Result; } }
/// <summary> /// SaveContentComment /// </summary> /// <param name="contentCommentRequest"></param> /// <returns></returns> public ServiceResponse <int> SaveContentComment(ContentCommentDC contentCommentRequest) { ServiceResponse <int> contentCommentResponse = new ServiceResponse <int>(); try { SetContext(); ContentComment comment = Mapper.Map <ContentCommentDC, ContentComment>(contentCommentRequest); _contentManager.SaveContentComment(comment); contentCommentResponse.Result = comment.ContentCommentId; } catch (Exception ex) { HandleError(ex, contentCommentResponse); } return(contentCommentResponse); }