Imports System.Runtime.Serialization

Namespace Messages

    <Serializable>
    <DataContract>
    <KnownType(GetType(DBNull))>
    Public Class TableResult
        Inherits BaseResponse

        <DataMember>
        Public Property Table As DataTable

        Public Sub New(Table As DataTable)
            MyBase.New()
            Me.Table = Table
        End Sub

        Public Sub New(ErrorMessage As String)
            MyBase.New(ErrorMessage)
        End Sub
    End Class

    <Serializable>
    <DataContract>
    <KnownType(GetType(DBNull))>
    Public Class ScalarResult
        Inherits BaseResponse

        <DataMember>
        Public Property Scalar As Object

        Public Sub New(Scalar As Object)
            MyBase.New()
            Me.Scalar = Scalar
        End Sub

        Public Sub New(ErrorMessage As String)
            MyBase.New(ErrorMessage)
        End Sub
    End Class

    <Serializable>
    <DataContract>
    <KnownType(GetType(DBNull))>
    Public Class NonQueryResult
        Inherits BaseResponse

        Public Sub New()
            MyBase.New()
        End Sub

        Public Sub New(ErrorMessage As String)
            MyBase.New(ErrorMessage)
        End Sub
    End Class
End Namespace



