public IActionResult New([FromBody] DriverDto dtoModle) { try { if (ModelState.IsValid) { _driverService.Insert(_mapper.Map <DriverModel>(dtoModle)); _driverService.ApplyChanges(); return(Ok()); } return(BadRequest(ModelState)); } catch (Exception ex) { return(StatusCode(500, ex.ToString())); throw; } }