Exemple #1
0
        public HeDaoTao GetById(string id)
        {
            HeDaoTaoDAO context = new HeDaoTaoDAO();

            try
            {
                HeDaoTao hdt = contextHdt.GetById(id);
                return(hdt);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return(null);
            }
        }
Exemple #2
0
        /// <summary>
        /// Lấy tất cả record
        /// </summary>
        /// <returns>List</returns>
        public List <HeDaoTao> GetAll()
        {
            HeDaoTaoDAO context = new HeDaoTaoDAO();

            try
            {
                List <HeDaoTao> lstHDT = context.GetAll();
                return(lstHDT);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return(null);
            }
        }