public void AddPosts(ApiPostsResponseModel item) { if (!this.Posts.Any(x => x.Id == item.Id)) { this.Posts.Add(item); } }
public virtual ApiPostsResponseModel MapRequestToResponse( int id, ApiPostsRequestModel request) { var response = new ApiPostsResponseModel(); 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.Tags, request.Title, request.ViewCount); return(response); }