Exemple #1
0
 public void AddVotes(ApiVotesResponseModel item)
 {
     if (!this.Votes.Any(x => x.Id == item.Id))
     {
         this.Votes.Add(item);
     }
 }
Exemple #2
0
        public virtual ApiVotesRequestModel MapResponseToRequest(
            ApiVotesResponseModel response)
        {
            var request = new ApiVotesRequestModel();

            request.SetProperties(
                response.BountyAmount,
                response.CreationDate,
                response.PostId,
                response.UserId,
                response.VoteTypeId);
            return(request);
        }
Exemple #3
0
        public virtual ApiVotesResponseModel MapRequestToResponse(
            int id,
            ApiVotesRequestModel request)
        {
            var response = new ApiVotesResponseModel();

            response.SetProperties(id,
                                   request.BountyAmount,
                                   request.CreationDate,
                                   request.PostId,
                                   request.UserId,
                                   request.VoteTypeId);
            return(response);
        }