Ejemplo n.º 1
0
 public void Relase(ReplyDTO reply)
 {
     using (IReplyService replySvc = new ReplyService())
     {
         replySvc.Create(ReplyDTOToReply(reply));
     }
 }
Ejemplo n.º 2
0
 public Reply ReplyDTOToReply(ReplyDTO reply)
 {
     return(new Reply()
     {
         Content = reply.Content,
         CommentId = reply.CommentId,
         UserId = reply.UserId
     });
 }
Ejemplo n.º 3
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);
     }
 }
Ejemplo n.º 4
0
 public void Edit(ReplyDTO reply)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 5
0
 public void Delete(ReplyDTO reply)
 {
     throw new NotImplementedException();
 }