Example #1
0
        public IActionResult Create([FromBody] ProgramInfo program)
        {
            if (!AllCoursesPresent(program.Courses))
            {
                return(NotFound());
            }
            var created = context.Create(program);

            return(CreatedAtRoute("GetProgram", new { id = created.Id }, created));
        }