Example #1
0
 public Dictionary <string, List <LancamentoEntity> > GetAll()
 {
     try
     {
         List <LancamentoEntity> lancamentos = new LancamentoRepository().GetAll();
         return(new Dictionary <string, List <LancamentoEntity> >()
         {
             { "ativos", lancamentos.Where(l => l.Ativo == true).ToList() },
             { "inativos", lancamentos.Where(l => l.Ativo == false).ToList() }
         });
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }