Why does my WCF service return and ARRAY instead of a List ?

后端 未结 3 1652
面向向阳花
面向向阳花 2020-12-10 12:44

In the web servce I say

 public List GetCustomers()
    {
        PR1Entities dc = new PR1Entities();
        var q = (from x in dc.Customers         


        
3条回答
  •  北海茫月
    2020-12-10 13:32

    Right click on your service reference --> Configure Service Reference --> Under "Data Type" change "Collection Type" to System.Collections.ArrayList or whatever type you want the array to deserialize as.

    Your list is serialized into an array (server side). You choose how to deserialize it (client side).

提交回复
热议问题