Exemplo n.º 1
0
 public void AddSpecies(ApiSpeciesResponseModel item)
 {
     if (!this.Species.Any(x => x.Id == item.Id))
     {
         this.Species.Add(item);
     }
 }
        public virtual ApiSpeciesRequestModel MapResponseToRequest(
            ApiSpeciesResponseModel response)
        {
            var request = new ApiSpeciesRequestModel();

            request.SetProperties(
                response.Name);
            return(request);
        }
        public virtual ApiSpeciesResponseModel MapRequestToResponse(
            int id,
            ApiSpeciesRequestModel request)
        {
            var response = new ApiSpeciesResponseModel();

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