Example #1
0
 public void AddDestination(ApiDestinationResponseModel item)
 {
     if (!this.Destinations.Any(x => x.Id == item.Id))
     {
         this.Destinations.Add(item);
     }
 }
		public virtual ApiDestinationRequestModel MapResponseToRequest(
			ApiDestinationResponseModel response)
		{
			var request = new ApiDestinationRequestModel();
			request.SetProperties(
				response.CountryId,
				response.Name,
				response.Order);
			return request;
		}
		public virtual ApiDestinationResponseModel MapRequestToResponse(
			int id,
			ApiDestinationRequestModel request)
		{
			var response = new ApiDestinationResponseModel();
			response.SetProperties(id,
			                       request.CountryId,
			                       request.Name,
			                       request.Order);
			return response;
		}