EDMIService: Rework NewFile and SetAttributeValue
This commit is contained in:
26
Service.EDMIService/BaseMethod.vb
Normal file
26
Service.EDMIService/BaseMethod.vb
Normal file
@@ -0,0 +1,26 @@
|
||||
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)
|
||||
Logger.Error(pException)
|
||||
Throw pException
|
||||
End Function
|
||||
End Class
|
||||
Reference in New Issue
Block a user