public async Task <IActionResult> DeleteMotorista(int?idMotorista)
        {
            int result = 0;

            if (idMotorista == null)
            {
                return(BadRequest());
            }

            try
            {
                result = await motoristaRepository.DeleteMotorista(idMotorista);

                if (result == 0)
                {
                    return(NotFound());
                }

                return(Ok());
            }
            catch (Exception)
            {
                return(BadRequest());
            }
        }