Base: move Files
This commit is contained in:
17
Base/DatabaseEx.vb
Normal file
17
Base/DatabaseEx.vb
Normal file
@@ -0,0 +1,17 @@
|
||||
Public Class DatabaseEx
|
||||
''' <summary>
|
||||
''' TODO: Deprecate
|
||||
''' Checks a Row value for three different `null` values,
|
||||
''' Nothing, Empty String, DBNull
|
||||
'''
|
||||
''' Returns the original value if the value is not null, or `defaultValue`
|
||||
''' </summary>
|
||||
''' <typeparam name="T">The type of the value</typeparam>
|
||||
''' <param name="pRow">The DataRow that contains the value</param>
|
||||
''' <param name="pColumn">The column name</param>
|
||||
''' <param name="pDefaultValue">The default value</param>
|
||||
''' <returns>The original value or the default value</returns>
|
||||
Public Shared Function NotNull(Of T)(ByVal pRow As DataRow, pColumn As String, pDefaultValue As T) As T
|
||||
Return ObjectEx.NotNull(pRow.Item(pColumn), pDefaultValue)
|
||||
End Function
|
||||
End Class
|
||||
Reference in New Issue
Block a user