public void AddReply(ApiReplyResponseModel item) { if (!this.Replies.Any(x => x.ReplyId == item.ReplyId)) { this.Replies.Add(item); } }
public virtual ApiReplyRequestModel MapResponseToRequest( ApiReplyResponseModel response) { var request = new ApiReplyRequestModel(); request.SetProperties( response.Content, response.Date, response.ReplierUserId, response.Time); return(request); }
public virtual ApiReplyResponseModel MapRequestToResponse( int replyId, ApiReplyRequestModel request) { var response = new ApiReplyResponseModel(); response.SetProperties(replyId, request.Content, request.Date, request.ReplierUserId, request.Time); return(response); }