SilverlightShow: Producing and Consuming OData in a Silverlight and Windows Phone 7 application (Part 2) Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples SilverlightShow.net http://www.rssboard.org/rss-specification Argotic Syndication Framework 2008.0.2.0, http://www.codeplex.com/Argotic en-US estoychev@completit.com (Emil Stoychev) RE: Producing and Consuming OData in a Silverlight and Windows Phone 7 application (Part 2) <p>thanks Michael, that is really helpful. </p> <p>I found the one similar to yours "<a href="http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_windowsphone7andthecloud_topic2#_Toc283646805">http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_windowsphone7andthecloud_topic2#_Toc283646805</a>"</p> <p>I am making the windows phone 7 client for the native silverlight 4 application which runs on WCF service, and I used to entity framework and domain service for the data connection. When I created the service reference for the WP7, the domain service does not support to write back in current version. </p> <p>Your example helps to write back from the WP7</p> http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application-Part-2.aspx#comment5814 dongol http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application-Part-2.aspx Thu, 31 Mar 2011 09:05:01 GMT RE: Producing and Consuming OData in a Silverlight and Windows Phone 7 application (Part 2) <p>Hey Dongol,</p> <p>Make sure that the entity set is set to something like .AllWrite instead of .AllRead as shown below: </p> <p ><span style="font-family: verdana; font-size: small;"></span></p> <div><span style="font-size: 10pt; line-height: 14px; font-family: verdana, sans-serif;">config.SetEntitySetAccessRule(<span style="color: #a31515;">"Students"</span>, <span style="color: #2b91af;">EntitySetRights</span>.AllWrite);</span></div> <div><span style="font-size: 10pt; line-height: 14px; font-family: verdana, sans-serif;"><br /> </span></div> <div>This will permit all write access on Student entity set. </div>   <p><br /> </p> <p>You can then use code similar to this screenshot: <a href="http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/1619/Images/35.gif">http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/1619/Images/35.gif</a></p> <p>or scroll down to the bottom of this article for more info: <a href="http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/1619/">http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/1619/</a></p> <p>One thing to note is that right now you cannot use LINQ right now with the WP7 version. I have heard they are planning to release a fix for this at some point. </p> <p>I hope this helps.</p> http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application-Part-2.aspx#comment5811 mbcrump http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application-Part-2.aspx Wed, 30 Mar 2011 20:55:35 GMT RE: Producing and Consuming OData in a Silverlight and Windows Phone 7 application (Part 2) <p>if I need to write back from the windows phone 7 client to the server, how would I do that. As I did some of the research, I learned that odata currently supports read only.</p> http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application-Part-2.aspx#comment5799 dongol http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application-Part-2.aspx Wed, 30 Mar 2011 07:21:33 GMT RE: Producing and Consuming OData in a Silverlight and Windows Phone 7 application (Part 2) <p>Hello Chaitanyarvk, OData is just the service and doesn't care what is accessing it (so it could be LinqPAD, a console application, silverlight, windows phone 7, etc). Now in order for Silverlight to consume the service, you would need to use a cross domain policy file in place on the target server. <a href="http://timheuer.com/blog/archive/2008/04/06/silverlight-cross-domain-policy-file-snippet-intellisense.aspx">Here </a>is a great writeup on it. I hope this helps. </p> http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application-Part-2.aspx#comment5790 mbcrump http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application-Part-2.aspx Tue, 29 Mar 2011 15:33:42 GMT RE: Producing and Consuming OData in a Silverlight and Windows Phone 7 application (Part 2) <p>Thanks for the second part, by the way does OData need Cross Domain Policy files?</p> http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application-Part-2.aspx#comment5789 chaitanyavrk http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application-Part-2.aspx Tue, 29 Mar 2011 12:37:41 GMT RE: Producing and Consuming OData in a Silverlight and Windows Phone 7 application (Part 2) <p>As usual, good one. Have my 5.</p> http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application-Part-2.aspx#comment5783 kunal2383 http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application-Part-2.aspx Mon, 28 Mar 2011 19:11:49 GMT