I have a BO project to ecapsulate all the data access.
I'd like to now create a webservice project to utilize the BOs I created (which will be consumed by both web and win forms).
Would webservices be a good fit here? I haven't played with webservices much, so I am beginning my google quest, but wanted to see if anyone here has implemented this and would be willing to share their ideas.
Thanks!
<WebMethod()> _ Public Function SampleMethod() As String '-- Determine if the connection has been established If MicroFour.StrataFrame.Data.DataBasics.DataSources.Count = 0 Then DataBasics.DataSources.Add(New SqlDataSourceItem("", "MyConnectionSTring")) End If
Return "Whatever" End Function
- or -
Much Better SolutionYou can add a global.asax to your webservice project and add the code once in the Application_Startup method and never worry about it...
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) DataBasics.DataSources.Add(New SqlDataSourceItem("", "MyConnectionSTring"))End Sub
Kevin