Пример #1
0
 public void Relase(ReplyDTO reply)
 {
     using (IReplyService replySvc = new ReplyService())
     {
         replySvc.Create(ReplyDTOToReply(reply));
     }
 }
Пример #2
0
 public ReplyDTO GetReply(Guid commentId)
 {
     using (IReplyService replySvc = new ReplyService())
     {
         ReplyDTO replyDTO = new ReplyDTO();
         replyDTO.IsNull = true;
         Reply reply = replySvc.GetAll().Where(m => m.CommentId == commentId).FirstOrDefault();
         if (reply != null)
         {
             replyDTO = ReplyToReplyDTO(reply);
             using (IUserService userSvc = new UserService())
             {
                 replyDTO.CompanyName = userSvc.GetOneById(replyDTO.UserId).CompanyName;
             }
             replyDTO.IsNull = false;
         }
         return(replyDTO);
     }
 }