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); }
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; } }