Click here to Skip to main content
15,887,979 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Send data to server from Windows Phone 7 to Web application using WCF . I am able to send few parameters but how can i send 10 ,15 or 20 rows of data.

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

XML
using (dbContext context = new dbContext())
{
     IQueryable<tasks> taskStatQuery = from t in context.Tasks  select t;
     List<tasks> allTasksStatus = taskStatQuery.ToList();

     WcfFSMSer.Win7MobileServiceClient client = new WcfFSMSer.Win7MobileServiceClient();

     client.TestFunctionAsync(whatParamToSendForSendingFewRows);
     client.TestFunctionCompleted += new EventHandler<WcfFSMSer.TestFunctionCompletedEventArgs>(client_TestFunctionCompleted);

}


C#
void client_TestFunctionCompleted(object sender, WcfFSMSer.TestFunctionCompletedEventArgs e) {

    }



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

The method in wcf is not accepting any collection object from client side.

How to send these values from WP7 to WCF?

Does any one have any link or example , to send atleast 2,3 rows of data ?

Please let me know if any other more information is needed to solve this issue


Thanks in advance.
Posted
Updated 20-Feb-13 23:11pm
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900