Ejemplo n.º 1
0
        public CourseDisplayDto AdminGetCourseById(int courseId)
        {
            var course = courseRepository.AdminGetCourseById(courseId);

            if (course == null)
            {
                return(null);
            }

            var displayCourse = new CourseDisplayDto
            {
                CourseId    = course.CourseId,
                Name        = course.Name,
                Description = course.Description,
                CreatedOn   = course.CreatedOn,
                Lecturer    = new LecturerDisplayDto
                {
                    Name = course.Publisher.NickName
                }
            };

            return(displayCourse);
        }