Esempio n. 1
0
        public virtual ApiPostClientResponseModel MapClientRequestToResponse(
            int id,
            ApiPostClientRequestModel request)
        {
            var response = new ApiPostClientResponseModel();

            response.SetProperties(id,
                                   request.AcceptedAnswerId,
                                   request.AnswerCount,
                                   request.Body,
                                   request.ClosedDate,
                                   request.CommentCount,
                                   request.CommunityOwnedDate,
                                   request.CreationDate,
                                   request.FavoriteCount,
                                   request.LastActivityDate,
                                   request.LastEditDate,
                                   request.LastEditorDisplayName,
                                   request.LastEditorUserId,
                                   request.OwnerUserId,
                                   request.ParentId,
                                   request.PostTypeId,
                                   request.Score,
                                   request.Tag,
                                   request.Title,
                                   request.ViewCount);
            return(response);
        }
Esempio n. 2
0
 public void AddPost(ApiPostClientResponseModel item)
 {
     if (!this.Posts.Any(x => x.Id == item.Id))
     {
         this.Posts.Add(item);
     }
 }
Esempio n. 3
0
 public void SetWikiPostIdNavigation(ApiPostClientResponseModel value)
 {
     this.WikiPostIdNavigation = value;
 }
Esempio n. 4
0
 public void SetExcerptPostIdNavigation(ApiPostClientResponseModel value)
 {
     this.ExcerptPostIdNavigation = value;
 }
Esempio n. 5
0
 public void SetRelatedPostIdNavigation(ApiPostClientResponseModel value)
 {
     this.RelatedPostIdNavigation = value;
 }