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)); }
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)); }