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