public ActionResult Details(int id)
        {
            var carrier          = _appCarrier.GetById(id);
            var carrierViewModel = _mapper.Map <Carrier, CarrierViewModel>(carrier);

            return(View(carrierViewModel));
        }
Beispiel #2
0
        public ActionResult Create(int carrierId)
        {
            var carrier = _appCarrier.GetById(carrierId);

            if (carrier.Id == 0)
            {
                return(Redirect("/Encontrar-Transportadora"));
            }

            var carrierViewModel            = _mapper.Map <Carrier, CarrierViewModel>(carrier);
            var carrierPhoneNumberViewModel = new CarrierPhoneNumberViewModel {
                CarrierId = carrierId, Carrier = carrierViewModel
            };

            return(View(carrierPhoneNumberViewModel));
        }