示例#1
0
        public IActionResult GetById(int id)
        {
            var entity = _repository.GetById(id);

            if (entity == null)
            {
                return(NotFound());
            }
            return(Ok(entity));
        }
        // GET: Pedido
        public ActionResult Index(int lancheId)
        {
            LancheRepository repositoryLanche = new LancheRepository();

            ViewBag.NomeLanche = repositoryLanche.GetById(lancheId).Descricao;

            return(View(pedido.Ingredientes(lancheId)));
        }