Quantcast
Viewing all articles
Browse latest Browse all 32059

How to send custom object from client to server ?

How to send custom  object from client to server ?

if i have a class task at client side and i need to send List of task to server. How to do this.


I have saved the data in local database in the WP7 . I have a Task table there . There may be 10,15,20 or... rows of data in that table . I want to send those number of rows of data to server using my wcf service . I am able to send the parameter to the server like i have a login method in the wcf which takes email and password as parameter returns boolean value true or false. Now I need to send these few 10,15,20 or... rows of data to the server via the WCF service and save in the server database. I am stuck at sending the number of rows to the wcf method. I have the Task data in list object. I have debugged and checked the presence of data.

Here is the code part

using(dbContext context =new dbContext()){IQueryable<tasks> taskStatQuery =from t in context.Tasksselect t;List<tasks> allTasksStatus = taskStatQuery.ToList();WcfFSMSer.Win7MobileServiceClient client =newWcfFSMSer.Win7MobileServiceClient();       client.TestFunctionAsync(whatParamToSendForSendingFewRows);      client.TestFunctionCompleted+=newEventHandler<WcfFSMSer.TestFunctionCompletedEventArgs>(client_TestFunctionCompleted);}void client_TestFunctionCompleted(object sender,WcfFSMSer.TestFunctionCompletedEventArgs e){}

I am able to get all tasks list in this variable List allTasksStatus.

How to send these values from WP7 to WCF?

Thanks in advance

Viewing all articles
Browse latest Browse all 32059

Trending Articles