public IEnumerable <string> Get() { try { var acoes = _acaoRepository.GetAll(); List <string> acoesList = new List <string>(); acoes.ToList().ForEach(acao => { acoesList.Add(acao.NmAcao); }); return(acoesList); } catch (Exception ex) { return(new string[] { "ERRO: " + ex.Message }); } //return new string[] { "value1", "value2" }; }
public IActionResult List() { var lstAcoes = _acaoRepository.GetAll(); return(View(lstAcoes)); }