Пример #1
0
        public bool Update(DeThi entity)
        {
            var tan = tn.DeThis.Find(entity.MaDe);

            tan.MoTa     = entity.MoTa;
            tan.MaMon    = entity.MaMon;
            tan.LoaiDe   = entity.LoaiDe;
            tan.MaxQuiz  = entity.MaxQuiz;
            tan.Status   = entity.Status;
            tan.Time     = entity.Time;
            tan.Audio    = entity.Audio;
            tan.Password = entity.Password;
            tn.SaveChanges();
            return(true);
        }
Пример #2
0
 public int Insert(DeThi entity)
 {
     tn.DeThis.Add(entity);
     tn.SaveChanges();
     return(entity.MaDe);
 }