This question is locked. New answers and comments are not allowed.
Am I doing this correctly?
I want to make an ORM entity available as a public property in my ebservice so when I consume the webservice, it will have knowledge of the business entity. I want to create a generic list of businesses and pass it to my WS
I am using a web service to Push businesses from website a TO b
The Web service has a public property for the business entity
I then want to create a list of businesses and pass it to the following webservice method:
Here is where I call the web service
The part around the ***** is where I am having trouble.
Should I be able to do this?
I may have some slight var naming problems because I renamed anything that indicated the name of my website.
I want to make an ORM entity available as a public property in my ebservice so when I consume the webservice, it will have knowledge of the business entity. I want to create a generic list of businesses and pass it to my WS
I am using a web service to Push businesses from website a TO b
The Web service has a public property for the business entity
Private _ Business As ORM.Business
Public Property Business() As ORM.Business
Get
Return Me._Business
End Get
Set(value As ORM.Business)
Me._Business = value
End Set
End Property
I then want to create a list of businesses and pass it to the following webservice method:
<
WebMethod
()> _
Public Function AddOrUpdateBusinesses(Businesses As List(Of ORM.Business)) As Boolean
blah blah
End Function
Here is where I call the web service
Dim ws As New BusinessWS
'*********************************
Dim BusList As List(Of BusinessWS.Business) = Nothing'*********************************
'Get data from DB A
Using dbContext As New GMCC_Model
Dim BusList As List(Of Business_Account) = (
From businessaccounts In dbContext.Business_Accounts
Where (businessaccounts.Status = "A" And businessaccounts.Allow3rdPartyAccess = 1)
Select businessaccounts).ToList
If Not BusList Is Nothing Then
For Each bus As GMCC_ORM.Business_Account In BusList
'create a new business to insert into DB B
Dim Business As New ca.myWebsite.Business
Business.ActiveCity.City = bus.City
Business.ActiveCity.Country = "Canada"
Business.ActiveCity.Province = bus.Province
Business.BusinessActive = (bus.Status = "A")
Business.Address = bus.CivicAddress
Business.Email = bus.Email
Business.Name = bus.Name
Business.Postal = bus.Postal
Business.Telephone = bus.Telephone
Business.Website = bus.URL
BusList.Add(Business)
Next
End If
End Using
ws.AddOrUpdateBusinesses(BusList)
The part around the ***** is where I am having trouble.
Should I be able to do this?
I may have some slight var naming problems because I renamed anything that indicated the name of my website.