コード例 #1
0
        public IActionResult AddInstructorToDriver([FromQuery] int driverId, [FromQuery] int instructorId)
        {
            if (driverId == 0 || instructorId == 0)
            {
                return(BadRequest("Error"));
            }

            try
            {
                _driverService.AddInstructorToDriver(driverId, instructorId);
                return(Ok());
            }
            catch (Exception)
            {
                return(BadRequest("Error"));
            }
        }