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