public async Task <IActionResult> Get(string text = null)
 {
     try
     {
         return(Ok(await DpdCityRepository.GetDPDCityAsync(text)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
        public async Task <IActionResult> Index([FromBody] DPDCalcRequestModel request)
        {
            try
            {
                var deliveryCity = await DpdCityRepository.GetDPDCityAsync(request.DeliveryCityName);

                var pickupCity = await DpdCityRepository.GetDPDCityAsync(request.PickupCityName);

                var serviceCosts = await _calcClient.getServiceCost2Async(new DPDCalc.serviceCostRequest()
                {
                    auth = new DPDCalc.auth()
                    {
                        clientKey    = request.ClientKey,
                        clientNumber = request.ClientNumber
                    },
                    delivery = new DPDCalc.cityRequest()
                    {
                        cityId          = deliveryCity.FirstOrDefault().cityId,
                        cityIdSpecified = true,
                    },
                    pickup = new DPDCalc.cityRequest()
                    {
                        cityId          = pickupCity.FirstOrDefault().cityId,
                        cityIdSpecified = true,
                    },
                    declaredValue = request.DeclaredValue,
                    selfDelivery  = request.SelfDelivery,
                    selfPickup    = request.SelfPickup,
                    weight        = request.Weight
                });

                return(Ok(serviceCosts));
            }
            catch (Exception exc)
            {
                return(BadRequest(exc.Message));
            }
        }