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); }
public LectureDto Get(int id) { return(_mapper.Map <LectureDto>(_lectureRepository.Get(id))); }