public IActionResult Editar(int id) { var categ = categoriaService.List(); ViewBag.Categoria = categ.Select(c => new SelectListItem() { Text = c.Descricao, Value = c.Id.ToString() }); var despesa = despesaService.SelectById(id) ?? new Despesa(); return(View(despesa)); }
public IActionResult Index() { var categoria = categoriaService.List(); return(View(categoria)); }