Beispiel #1
0
        public async Task <ActionResult <CourseProgramOutputModel> > GetObjByCourseId(int courseId)
        {
            if (courseId.Equals(null))
            {
                return(BadRequest("Course Id is empty"));
            }

            var courseProgram = CourseProgramMapper.ToCourseProgramOutputModel(await courseStorage.CourseProgramGetByCourseId(courseId));

            if (courseProgram == null)
            {
                return(NotFound("Object not found"));
            }

            return(Ok(courseProgram));
        }