예제 #1
0
        public static Lecture GetLectureOrFail(this ILectureRepository _lectureRepository, string name)
        {
            var lecture = _lectureRepository.Get(name);

            if (lecture != null)
            {
                throw new Exception($"Wyklad o podanej nazwie: {name} istnieje");
            }

            return(lecture);
        }
예제 #2
0
 public LectureDto Get(int id)
 {
     return(_mapper.Map <LectureDto>(_lectureRepository.Get(id)));
 }