Esempio n. 1
0
        public Boolean InserirBD(Historia _objeto)
        {
            try
            {
                HistoriaDAO dao = new HistoriaDAO();

                return(dao.InserirBD(_objeto));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Esempio n. 2
0
        public Boolean RemoverBD(int _id)
        {
            try
            {
                HistoriaDAO dao = new HistoriaDAO();

                return(dao.DeletarBD(_id));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Esempio n. 3
0
        public Dictionary <Int64, Historia> ListarHistorias()
        {
            try
            {
                Dictionary <Int64, Historia> mapaHistorias = new Dictionary <Int64, Historia>();
                HistoriaDAO dao = new HistoriaDAO();

                foreach (Historia o in dao.ListarTodos())
                {
                    mapaHistorias.Add(o.id, o);
                }

                return(mapaHistorias);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }