Beispiel #1
0
        public bool DeleteQuizInTheard(int id)
        {
            var tan = tn.ch_db.Find(id);

            tn.ch_db.Remove(tan);
            tn.SaveChanges();
            return(true);
        }
Beispiel #2
0
        public bool Delete(int id)
        {
            var qz = tn.KetQuas.Find(id);

            tn.KetQuas.Remove(qz);
            tn.SaveChanges();
            return(true);
        }
Beispiel #3
0
 public int Insert(DeThi entity)
 {
     tn.DeThis.Add(entity);
     tn.SaveChanges();
     return(entity.MaDe);
 }
Beispiel #4
0
 public int Insert(ThiSinh entity)
 {
     tn.ThiSinhs.Add(entity);
     tn.SaveChanges();
     return(entity.MaThiSinh);
 }
Beispiel #5
0
 public int Insert(Quiz entity)
 {
     tn.Quizs.Add(entity);
     tn.SaveChanges();
     return(entity.MaCauHoi);
 }
Beispiel #6
0
 public int Insert(MonThi entity)
 {
     tn.MonThis.Add(entity);
     tn.SaveChanges();
     return(entity.MaMon);
 }
Beispiel #7
0
 public int Insert(Lop entity)
 {
     tn.Lops.Add(entity);
     tn.SaveChanges();
     return(entity.MaLop);
 }
Beispiel #8
0
 public int Insert(TaiKhoan entity)
 {
     tn.TaiKhoans.Add(entity);
     tn.SaveChanges();
     return(entity.id);
 }