Exemple #1
0
        public async Task <IActionResult> Post([FromBody] DriverRequest data)
        {
            var response = await _driverService.AddDriverAsync(data);

            if (response)
            {
                return(Ok(response));
            }

            return(NotFound(null));
        }
Exemple #2
0
 // POST: api/Driver
 public async Task <int> Post(Driver driver)
 {
     return(await _driverService.AddDriverAsync(driver));
 }