<p>Has anyone used ADO.NET Data Services as a data source for Adobe Flex applications?  If so, any success stories or tragedies to avoid?  If you did use it, how did you handle security?</p>

[{'answer_id': 45891, 'author': 'Adam Cuzzort', 'author_id': 4760, 'author_profile': 'https://Stackoverflow.com/users/4760', 'pm_score': 3, 'selected': True, 'text': '<p>I use WebORB for .NET to do Flex remoting and then use DLINQ on the server. One tricky thing about using LINQ with WebORB is that WebORB uses Reflection to automatically retrieve all the relationships of the object(s) you return to Flex. This causes severe time penalties as LINQ uses lazy loading to load relationships. To prevent this from happening, I do something like the following:</p>\n\n<p>Override your DataContext\'s constructor and add the following code:</p>\n\n<pre><code>this.DeferredLoadingEnabled = false;\nDataLoadOptions dlo = new DataLoadOptions();\ndlo.LoadWith&lt;Order&gt;(q =&gt; q.Payments);\ndlo.LoadWith&lt;Order&gt;(q =&gt; q.Customer);\nthis.LoadOptions = dlo;\n</code></pre>\n\n<p>This tells the DataContext to disable deferred loading of relationships and specifically instructs it to load just the relationships you want, without lazy loading. That way, WebORB isn\'t causing any lazy loading to happen through Reflection and the number of relationships being transferred to Flex is kept at a minimum.</p>\n\n<p>Hope this helps you in some way. It\'s definitely one of those little "gotchas" when working with Flex/WebORB and LINQ.</p>\n'}, {'answer_id': 49534, 'author': 'Keith', 'author_id': 905, 'author_profile': 'https://Stackoverflow.com/users/905', 'pm_score': 1, 'selected': False, 'text': '<p>Yes, we use Flex with .Net web services extensively.</p>\n\n<p>Flex can\'t handle .Net DataSets, or indeed much by way of complex xml types. We found that it was best to keep to relatively simple xml output.</p>\n\n<p>However, if you do that, it can handle .Net web service output fine:</p>\n\n<pre><code>&lt;mx:WebService id="myDataService" showBusyCursor="true"&gt;\n    &lt;mx:operation name="WebMethodName" \n                  resultFormat="object" \n                  result="functionFiredOnComplete();"&gt;\n&lt;/mx:operation&gt;\n&lt;/mx:WebService&gt;\n\npublic function load():void\n{\n    myDataService.loadWSDL( "web method\'s wsdl" );\n    myDataService.WebMethodName.send( params );\n}\n\npublic function functionFiredOnComplete():void\n{           \n    // get data\n    var myData:Object = myDataService.WebMethodName.lastResult;\n    ...\n</code></pre>\n'}, {'answer_id': 763252, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>He Asked about ADO.NET Data Services not web service</p>\n'}, {'answer_id': 1173350, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>Flex can only do GET and POST\nFlex doesn't understand HTTP Response messages</p>\n\n<p>So in order to have Flex talk to ADO.NET data services you either have to;<br>\n1. use a proxy server, but you have to find or build one yourself<br>\n2. modify the incoming requests and use $method=MERGE and so on (same as proxy) <br>\n3. use another as3 httpService client, there are some opensource initiatives  <p></p>\n\n<p>Then you have to find out how to post data, and it cost a lot of time when you want to create a new record with JSON and specify a Id wich has a link to another table. This because you can't just update the integer, but instead you have to create a link string, it's feels not really easy.</p>\n\n<p><p></p>\n\n<p>So ofcourse it can be done, but out of the box you really have to make it yourself. I know that Flash Builder 4 will come with a REST import, this could speed up things, but hve no experience for that</p>\n"}]
['https://Stackoverflow.com/questions/44817', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4541/']