Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

passing List to Wcf Service

$
0
0

Hi,

I have a WCF that looks like this

[OperationContract]
void Insert(List<Person> person);

 [DataContract]
 public class Person
     {
         [DataMember]
         public  string Name
         { get; set; }
         [DataMember]
         public  string LastName
         { get; set; }
     }

From Client I made a reference to WCF and work fine. I have defined a list<Person> as

List<Person> pp = new List<Person>();

But when i make the call

WCFClient.Insert(pp);

Have an error type..

How I have to define to allow passing list<> to Wcf Methods?

Im working with Framework 4.5

Thanks


Diego


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>