Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' NOTE: If you change the interface name "IService1" here, you must also update the reference to "IService1" in App.config.
- <ServiceContract()> _
- Public Interface IInventoryService
- <OperationContract()> _
- Function GetInStock(ByVal productId As Integer) As Short
- <OperationContract()> _
- Function GetProduct(ByVal productId As Integer) As Product
- <OperationContract()> _
- Function UpdateProduct(ByVal _product As Product) As Boolean
- End Interface
- ' Use a data contract as illustrated in the sample below to add composite types to service operations
- <DataContract()> _
- Public Class Product
- Private productIdValue As Integer
- <DataMember()> _
- Public Property ProductId() As Integer
- Get
- Return productIdValue
- End Get
- Set(ByVal value As Integer)
- productIdValue = value
- End Set
- End Property
- Private productNameValue As String
- <DataMember()> _
- Public Property ProductName() As String
- Get
- Return productNameValue
- End Get
- Set(ByVal value As String)
- productNameValue = value
- End Set
- End Property
- Private unitPriceValue As Decimal
- <DataMember()> _
- Public Property UnitPrice() As Decimal
- Get
- Return unitPriceValue
- End Get
- Set(ByVal value As Decimal)
- unitPriceValue = value
- End Set
- End Property
- Private unitsInStockValue As Short
- <DataMember()> _
- Public Property UnitsInStock() As Short
- Get
- Return unitsInStockValue
- End Get
- Set(ByVal value As Short)
- unitsInStockValue = value
- End Set
- End Property
- Private unitsOnOrderValue As Short
- <DataMember()> _
- Public Property UnitsOnOrder() As Short
- Get
- Return unitsOnOrderValue
- End Get
- Set(ByVal value As Short)
- unitsOnOrderValue = value
- End Set
- End Property
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement