예제 #1
0
 public void AddPostLink(ApiPostLinkClientResponseModel item)
 {
     if (!this.PostLinks.Any(x => x.Id == item.Id))
     {
         this.PostLinks.Add(item);
     }
 }
예제 #2
0
        public virtual ApiPostLinkClientRequestModel MapClientResponseToRequest(
            ApiPostLinkClientResponseModel response)
        {
            var request = new ApiPostLinkClientRequestModel();

            request.SetProperties(
                response.CreationDate,
                response.LinkTypeId,
                response.PostId,
                response.RelatedPostId);
            return(request);
        }
예제 #3
0
        public virtual ApiPostLinkClientResponseModel MapClientRequestToResponse(
            int id,
            ApiPostLinkClientRequestModel request)
        {
            var response = new ApiPostLinkClientResponseModel();

            response.SetProperties(id,
                                   request.CreationDate,
                                   request.LinkTypeId,
                                   request.PostId,
                                   request.RelatedPostId);
            return(response);
        }