
Option Compare Binary
Option Infer On
Option Strict On
Option Explicit On

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.ComponentModel.DataAnnotations
Imports System.Data.Objects.DataClasses
Imports System.Linq
Imports System.ServiceModel.DomainServices.Hosting
Imports System.ServiceModel.DomainServices.Server
Imports TransactionsSilverlight.Web


'The MetadataTypeAttribute identifies CustomerMetadata as the class
' that carries additional metadata for the Customer class.
<MetadataTypeAttribute(GetType(Customer.CustomerMetadata))>  _
Partial Public Class Customer
    
    'This class allows you to attach custom attributes to properties
    ' of the Customer class.
    '
    'For example, the following marks the Xyz property as a
    ' required property and specifies the format for valid values:
    '    <Required()>
    '    <RegularExpression("[A-Z][A-Za-z0-9]*")>
    '    <StringLength(32)>
    '    Public Property Xyz As String
    Friend NotInheritable Class CustomerMetadata
        
        'Metadata classes are not meant to be instantiated.
        Private Sub New()
            MyBase.New
        End Sub
        
        Public Property Address As String
        
        Public Property City As String
        
        Public Property CompanyName As String
        
        Public Property ContactName As String
        
        Public Property ContactTitle As String
        
        Public Property Country As String
        
        Public Property CustomerID As String
        
        Public Property Fax As String
        
        <Include()>
        Public Property Orders As EntityCollection(Of Order)
        
        Public Property Phone As String
        
        Public Property PostalCode As String
        
        Public Property Region As String
    End Class
End Class

'The MetadataTypeAttribute identifies OrderMetadata as the class
' that carries additional metadata for the Order class.
<MetadataTypeAttribute(GetType(Order.OrderMetadata))>  _
Partial Public Class Order
    
    'This class allows you to attach custom attributes to properties
    ' of the Order class.
    '
    'For example, the following marks the Xyz property as a
    ' required property and specifies the format for valid values:
    '    <Required()>
    '    <RegularExpression("[A-Z][A-Za-z0-9]*")>
    '    <StringLength(32)>
    '    Public Property Xyz As String
    Friend NotInheritable Class OrderMetadata
        
        'Metadata classes are not meant to be instantiated.
        Private Sub New()
            MyBase.New
        End Sub
        
        Public Property Customer As Customer
        
        Public Property CustomerID As String
        
        Public Property EmployeeID As Nullable(Of Integer)
        
        Public Property Freight As Nullable(Of Decimal)
        
        <Include()>
        Public Property Order_Details As EntityCollection(Of Order_Detail)
        
        Public Property OrderDate As Nullable(Of DateTime)
        
        Public Property OrderID As Integer
        
        Public Property RequiredDate As Nullable(Of DateTime)
        
        Public Property ShipAddress As String
        
        Public Property ShipCity As String
        
        Public Property ShipCountry As String
        
        Public Property ShipName As String
        
        Public Property ShippedDate As Nullable(Of DateTime)
        
        Public Property ShipPostalCode As String
        
        Public Property ShipRegion As String
        
        Public Property ShipVia As Nullable(Of Integer)
    End Class
End Class

'The MetadataTypeAttribute identifies Order_DetailMetadata as the class
' that carries additional metadata for the Order_Detail class.
<MetadataTypeAttribute(GetType(Order_Detail.Order_DetailMetadata))>  _
Partial Public Class Order_Detail
    
    'This class allows you to attach custom attributes to properties
    ' of the Order_Detail class.
    '
    'For example, the following marks the Xyz property as a
    ' required property and specifies the format for valid values:
    '    <Required()>
    '    <RegularExpression("[A-Z][A-Za-z0-9]*")>
    '    <StringLength(32)>
    '    Public Property Xyz As String
    Friend NotInheritable Class Order_DetailMetadata
        
        'Metadata classes are not meant to be instantiated.
        Private Sub New()
            MyBase.New
        End Sub
        
        Public Property Discount As Single
        
        Public Property Order As Order
        
        Public Property OrderID As Integer
        
        Public Property ProductID As Integer
        
        Public Property Quantity As Short
        
        Public Property UnitPrice As Decimal
    End Class
End Class

