Force .NET webservice to use local object class, not proxy class

前端 未结 3 1344
猫巷女王i
猫巷女王i 2020-12-06 07:52

I have a webservice that I\'m calling from a windows forms application (both .NET, both in the same solution), and I\'d like my webservice to return a custom object from els

3条回答
  •  佛祖请我去吃肉
    2020-12-06 08:46

    I am not sure but when you compile a .NET web service it will create a DLL file which you can try using that for the local. But when I am building service oriented applications, I create different layers within my solution for e.g Data Access Layer, Logic Layer, Service Layer, UI Layer, Controller Layer, and for example in the Controller Layer I will do a user authentication method which is connected with the Data Access Layer and Logic Layer and then I will call that method on service layer and I can also call it on the UI layer and if I call it from within the UI layer it is called locally, when I want to use it from the service layer, I will create a web method using that method which will return a bool or username etc.

提交回复
热议问题