public CourseController(IGetCoursesCommand getCommandCourses, IGetCourseCommand getCommandCourse, IDeleteCourseCommand delCommandCourse, IEditCourseCommand editCommandCourse, IAddCourseCommand addCommandCourse) { _getCommandCourses = getCommandCourses; _getCommandCourse = getCommandCourse; _delCommandCourse = delCommandCourse; _editCommandCourse = editCommandCourse; _addCommandCourse = addCommandCourse; }
public IActionResult Delete(int id, [FromServices] IDeleteCourseCommand command) { executor.ExecuteCommand(command, id); return(NoContent()); }