public async Task <IActionResult> Post([FromBody] DriverRequest data) { var response = await _driverService.AddDriverAsync(data); if (response) { return(Ok(response)); } return(NotFound(null)); }
// POST: api/Driver public async Task <int> Post(Driver driver) { return(await _driverService.AddDriverAsync(driver)); }