Exemple #1
0
 public void AddBadge(ApiBadgeResponseModel item)
 {
     if (!this.Badges.Any(x => x.Id == item.Id))
     {
         this.Badges.Add(item);
     }
 }
Exemple #2
0
        public virtual ApiBadgeRequestModel MapResponseToRequest(
            ApiBadgeResponseModel response)
        {
            var request = new ApiBadgeRequestModel();

            request.SetProperties(
                response.Date,
                response.Name,
                response.UserId);
            return(request);
        }
Exemple #3
0
        public virtual ApiBadgeResponseModel MapRequestToResponse(
            int id,
            ApiBadgeRequestModel request)
        {
            var response = new ApiBadgeResponseModel();

            response.SetProperties(id,
                                   request.Date,
                                   request.Name,
                                   request.UserId);
            return(response);
        }