private IResult CheckIfExamNameExists(string examTitle) { if (_examDal.Get(p => p.Title == examTitle) != null) { return(new ErrorResult(Messages.ExamAlreadyExists)); } return(new SuccessResult()); }
public void Delete(int examId) { _examDal.Delete(_examDal.Get(filter: exam => exam.Id == examId)); }
public Exam GetById(int examId) { return(_examDal.Get(filter: exam => exam.Id == examId)); }