Example #1
0
 public void AddProvince(ApiProvinceResponseModel item)
 {
     if (!this.Provinces.Any(x => x.Id == item.Id))
     {
         this.Provinces.Add(item);
     }
 }
        public virtual ApiProvinceRequestModel MapResponseToRequest(
            ApiProvinceResponseModel response)
        {
            var request = new ApiProvinceRequestModel();

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

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