Example #1
0
        public CommentResponse DeleteComment(CommentRequestDelete request)
        {
            List <DocumentSharingDTO> shared = default;
            List <string>             mylist = new List <string>();
            CommentResponse           retval = default;

            if (IsDeleteAvailable(request.CommentID))
            {
                retval = _DAL.DeleteComment(request);
                shared = _documentSharingService.GetShareForDoc(new DocumentSharingRequestGetForDoc()
                {
                    DocID = request.DocID
                }).DocumentSharingDTO;
                if (shared != null)
                {
                    //create list type string for send to all
                    shared.ForEach(s => mylist.Add(s.UserId));
                    _messanger.SendMarkerToAll(mylist, retval);
                }
            }
            return(retval);
        }
Example #2
0
 public bool DeleteComment(int id)
 {
     return(_commentDal.DeleteComment(id));
 }