public IActionResult Buscar(string nombre) { try { var resultado = _depRepo.BuscarDepartamento(nombre); if (resultado.Any()) { return(Ok(resultado)); } return(NotFound()); } catch (Exception) { return(StatusCode(StatusCodes.Status500InternalServerError, "Error recuperando datos de la aplicacion")); } }