Example #1
0
        // GET: Orcamento/Details/5
        public ActionResult Details(int id)
        {
            var orcamento          = _gerenciadorDeOrcamento.BuscarPorId(id);
            var orcamentoViewModel = Mapeador.Mapear <Orcamento, OrcamentoViewModel>(orcamento);

            return(View(orcamentoViewModel));
        }
Example #2
0
        // GET: Details
        public HttpResponseMessage Get(int id)
        {
            HttpResponseMessage response;

            try
            {
                var orcamento = _gerenciadorDeOrcamento.BuscarPorId(id);

                response = Request.CreateResponse(HttpStatusCode.OK, orcamento);
            }
            catch (Exception ex)
            {
                response = Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex);
            }

            return(response);
        }