WCF Data Support on Windows Form

I want to host the WCF data service (formerly known as the ADO.NET Data Service) as windows. Is it possible? If so, is there a blog that talks about this? I know that WCF can be hosted on Windows Form, but I'm not sure about the WCF data service, since all the examples that I see are asking to create an ASP.NET web project.

-Brajesh

+1
source share
1 answer

It is very simple to host the WCF data service in a WinForms application (or in my case a unit test).

// add reference to System.Data.Services // identify your endpoint uri Uri endpoint = new Uri("http://localhost:12345/MyDataService"); // create the data service host DataServiceHost host = new DataServiceHost(typeof(MyDataService), new Uri[] { endpoint }); 
+2
source

Source: https://habr.com/ru/post/901401/


All Articles