Exemplo n.º 1
0
        public static TipoPagamentoDao ToApp(this TipoPagamento tipoPagamento)
        {
            TipoPagamentoDao tipoPagamentoDao = new TipoPagamentoDao();

            tipoPagamentoDao.TipoPagamentoID = tipoPagamento.TipoPagamentoID;
            tipoPagamentoDao.Descricao       = tipoPagamento.Descricao;
            tipoPagamentoDao.Ativo           = tipoPagamento.Ativo;

            return(tipoPagamentoDao);
        }
Exemplo n.º 2
0
        public List <TipoPagamentoDao> Listar(TipoPagamentoDao tipoPagamentoDao)
        {
            try
            {
                return(tipoPagamentoRepository.Listar(tipoPagamentoDao.ToBd()).Select(x => x.ToApp()).ToList());
            }
            catch (Exception ex)
            {
                logRepository.Incluir(new Log()
                {
                    Descricao = ex.ToString(), DataHora = DateTime.Now
                });

                throw ex;
            }
        }