Exemplo n.º 1
0
        public async Task <IActionResult> GetTransportPricingById(int transportPricingId)
        {
            try
            {
                var _serviceEndPoint      = new ServicesEndPoint(_unitOfWork, _emailService);
                TransportPricing tpresult = await _serviceEndPoint.GetTransportPricingById(transportPricingId);

                TransportPricingViewModel result = _Mapper.Map <TransportPricingViewModel>(tpresult);
                if (result == null)
                {
                    return(NotFound(result));
                }
                return(Ok(result));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }