Problem returning Dataset via WCF service

I had a strange problem when returning a dataset through the WCF service (WSHttpBinding). I explain the senario below:

  • I have a Businesslayer, inside there is a Demo folder containing a demo.cs class file that carries a variable for a particular table.

  • Next, I have a Datalayer, inside - the Demo folder, also contains a class file demo.cs, which contains all the database related functions and methods.

  • Then I created a WCF service that contains the interface (Idemo.cs) that is defined by [ServiceContract], and all method signatures are defined using "OperationContract".

  • In the WCFService.cs class, I have all the methods that need to be called from the GUI.

  • Finally, I created a proxy for the service in the application using 'svcutil'.

NUMBER / PROBLEM:

All other services return a list object that works fine, but in a demo case, it returns a dataset. In the case of a data set, the service created (in appCode) is very different from another class that returns classes. All other services are called using a structure such as "Businesslayer.demo.demolist objdemo" but in this case this structure shows an error and excludes the structure "demo objdemo"

Iโ€™m not right now, can I explain my concern, but it will be very useful if someone can send me a demo application with the same senario, returning the data set through the WCF service.

+4
source share

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


All Articles