Example #1
0
        // GET: Carro/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            try
            {
                Carro          carro   = service.Buscar(id);
                CarroViewModel carroVM = Mapper.Map <Carro, CarroViewModel>(carro);
                return(View(carroVM));
            }
            catch (BusinessException ex)
            {
                return(HttpNotFound(ex.Message));
            }
        }