public void Add(Lesson entity) { if (Validation(entity)) { return; } if (_lessonDal.GetAll().Any(p => p.LessonCode.Equals(entity.LessonCode))) { Message.Error("Ders Kodu Mevcut!"); return; } try { _lessonDal.Add(entity); Message.Info("Ders eklendi."); } catch (Exception exp) { Message.Error("Ders eklenirken hata oluştu!\n" + exp.Message); } }
public List <Lesson> GetAll() { return(_lessonDal.GetAll()); }
public IDataResult <List <Lesson> > GetAll(Expression <Func <Class, bool> > filter = null) { return(new SuccessDataResult <List <Lesson> >(_lessonDal.GetAll())); }