Primera Versión copiada del tfs
This commit is contained in:
13
bbdd.vb
Normal file
13
bbdd.vb
Normal file
@@ -0,0 +1,13 @@
|
||||
Imports Microsoft.EntityFrameworkCore
|
||||
|
||||
Public Class bbdd
|
||||
Public Shared Function ObtieneIPMysql(bd As DbContext) As String
|
||||
Try
|
||||
Dim sConexion As String = bd.Database.SqlQuery(Of String)($"select host from information_schema.processlist WHERE ID=connection_id();").ToList.First
|
||||
Dim sIP As String = sConexion.Split(":")(0)
|
||||
Return sIP
|
||||
Catch ex As Exception
|
||||
Return "** desconocida **"
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
Reference in New Issue
Block a user