public void Update(Lesson entity)
        {
            if (Validation(entity))
            {
                return;
            }
            if (_lessonDal.GetAll().Any(p => p.LessonCode.Equals(entity.LessonCode) && p.Id != entity.Id))
            {
                Message.Error("Ders Kodu Mevcut!");
                return;
            }

            try
            {
                _lessonDal.Update(entity);
                Message.Info("Ders güncellendi.");
            }
            catch (Exception exp)
            {
                Message.Error("Ders güncellenirken hata oluştu!\n" + exp.Message);
            }
        }
 public void Update(Lesson entity)
 {
     _lessonDal.Update(entity);
 }
示例#3
0
 public bool Update(Lessons entity)
 {
     return(lessonDal.Update(entity));
 }