27 lines
818 B
VB.net

Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Imports DigitalData.Services.EDMIService.IDB
Public MustInherit Class BaseMethod
Inherits BaseClass
Friend ReadOnly Database As MSSQLServer
Friend ReadOnly Helpers As Helpers
Public Sub New(pLogConfig As LogConfig, pMSSQLServer As MSSQLServer)
MyBase.New(pLogConfig)
Database = pMSSQLServer
Helpers = New Helpers(pLogConfig, pMSSQLServer)
End Sub
Public Function LogAndThrow(pMessage As String)
Logger.Warn(pMessage)
Throw New ApplicationException(pMessage)
End Function
Public Function LogAndThrow(pException As Exception, pMessage As String)
Logger.Error(pException)
Throw New ApplicationException(pMessage, pException)
End Function
End Class