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

            request.SetProperties(
                response.Date,
                response.Name,
                response.UserId);
            return(request);
        }
예제 #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);
        }