public void CheckLecturePermission(decimal lectureId) { if (LectureService.GetValues(lectureId, x => x.Group.Teacher_TC) != User.Employee_TC) { throw new PermissionException("lecture file"); } }