public void AddBadge(ApiBadgeResponseModel item) { if (!this.Badges.Any(x => x.Id == item.Id)) { this.Badges.Add(item); } }
public virtual ApiBadgeRequestModel MapResponseToRequest( ApiBadgeResponseModel response) { var request = new ApiBadgeRequestModel(); request.SetProperties( response.Date, response.Name, response.UserId); return(request); }
public virtual ApiBadgeResponseModel MapRequestToResponse( int id, ApiBadgeRequestModel request) { var response = new ApiBadgeResponseModel(); response.SetProperties(id, request.Date, request.Name, request.UserId); return(response); }