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

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