WCF Data Services (formerly known as ADO.NET Data Services) ForumPost feedback, questions and suggestions related to Released (RTM) versions of WCF Data Services Framework (formerly known as ADO.NET Data Services and Project "Astoria").© 2009 Microsoft Corporation. All rights reserved.Sun, 29 Nov 2009 00:10:26 Zbcfe430c-5d14-41e0-95c4-3c09dbaa597ahttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/1466ed05-948f-4acb-aa91-d5939d004976http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/1466ed05-948f-4acb-aa91-d5939d004976Mariano Kaplanhttp://social.msdn.microsoft.com/Profile/en-US/?user=Mariano%20KaplanMicrosoft Open Data Visualizer extensibility<p>Is there any way to extend the visualizer shapes to provide additional information?<br/><br/>Thanks a lot,<br/>~Mariano</p>Sun, 29 Nov 2009 00:10:26 Z2009-11-29T00:10:26Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/dbd8b6fe-ea42-4a53-9675-152f31edc644http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/dbd8b6fe-ea42-4a53-9675-152f31edc644niuniu23_1982_niuniuhttp://social.msdn.microsoft.com/Profile/en-US/?user=niuniu23_1982_niuniuNo return type for Store Procedure in LINQ to SQL<p>Actually, I did not find the right place to post LINQ to SQL related topic, feel free to move this if it was wrong.<br/><br/>When I map the store procedure to data function using LINQ to SQL, some times the tool can generate the Return Type(Auto-generated Type), but sometimes the Return Type is none even the same store procedure. <br/>I do not know the reasons. <br/>I'd appreciated if some one give me some advices.<br/></p>Fri, 27 Nov 2009 05:55:06 Z2009-11-28T07:46:30Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/41389d0c-db60-4321-bb92-b6dcde087476http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/41389d0c-db60-4321-bb92-b6dcde087476vhcvmmvmvhttp://social.msdn.microsoft.com/Profile/en-US/?user=vhcvmmvmvrapid set of calls through ADO.NET Data Services client seems to result in 403.9 too many users connected response or timeoutThis usually only manifests itself when I am running my unit tests but only a reset of IIS fixes it.  The library I have authored follows the following pattern: <div><br/></div> <div>Entities svc = new Entities(new uri(endpoint));</div> <div>//do stuff</div> <div><br/></div> <div>Am I running out of connections to the web serer doing this?  Should I be sharing the DataContext?</div> <div><br/></div>Fri, 20 Nov 2009 17:55:52 Z2009-11-27T07:22:02Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/a0ac275d-c684-4a65-8bce-5cbce86a2814http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/a0ac275d-c684-4a65-8bce-5cbce86a2814Alexey Zakharovhttp://social.msdn.microsoft.com/Profile/en-US/?user=Alexey%20ZakharovRelationship managmentHi,<br/> <br/> I'm using EF as a source for DataService.<br/> <br/> Some of my entities have many-to-many and one-to-many relationship. Should I always delete, add relationship from both sides or it is not necessary?<br/> <br/> Example:<br/> <br/> Products has many tags, Tag has many products:<br/> <br/> 1. context.AddLink(product,&quot;Tags&quot;, tag);<br/> context.AddLink(tag, &quot;Products, product);<br/> <br/> 2. context.AddLink(product,&quot;Tags&quot;, tag) - I want to update relationship only from one side. Would it be correct?<br/>Thu, 26 Nov 2009 09:50:35 Z2009-11-27T01:54:14Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/52c40c49-9dc9-488f-9a8d-e40b847947c7http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/52c40c49-9dc9-488f-9a8d-e40b847947c7Se3ker385http://social.msdn.microsoft.com/Profile/en-US/?user=Se3ker385Simple query not working with winforms?I am having trouble with a simple query.<br/><br/>I have two tables:<br/><br/> <pre>Users ________ UserID (guid) UserName ... Websites _________ WebsiteID (guid) WebsiteName WebsiteUrl UserID<br/>....<br/></pre> I am trying to get a list of websites per user, i tried theese, nothing works but the last which i dont need:<br/><br/> <pre lang=x-vbnet> Dim Service As New Service.ServiceEntities(New Uri(&quot;http://******.******.***/Service.svc/&quot;)) 'My.Settings.UserID returns a GUID that corresponds with one row in the DB. Dim Query As IQueryable(Of Websites) = Service.Websites.Where(Function(Website) Website.Users.UserID = My.Settings.UserID) Dim LinqQuery = From Websites In Service.Websites Where Websites.Users.UserID = My.Settings.UserID Select Websites Dim WorkingQuery As DataServiceQuery(Of Websites) = Service.Websites WebsitesBindingSource.DataSource = Query WebsitesBindingSource.DataSource = LinqQuery 'Only query that works WebsitesBindingSource.DataSource = WorkingQuery</pre> <br/>Also ive read that i can do this by adding query options, but i dont know how to construct it so its like the above examples,<br/>Ive tried something like this, but obviously this could not work.<br/><br/> <pre lang=x-vbnet> 'Even tried inputing the GUID directly, thinking maybe it could work... Dim QueryWithOptions As DataServiceQuery(Of Websites) = Service.Websites.AddQueryOption(&quot;$filter&quot;, &quot;Users.UserID eq f1bedd51-afd7-4bcf-bbcb-a58b59a29c06&quot;) </pre> <br/><br/>I dont understand why is the .NET Client Library for ado.net data services so &quot;poor&quot;, or i just everything oriented at silverlight.. Am i better of using WCF and doing all the plumbing myself??<br/><br/><hr class="sig">VB.NET to C# http://www.developerfusion.com/tools/convert/vb-to-csharp/Thu, 26 Nov 2009 13:41:05 Z2009-11-26T20:59:18Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/9dab68db-4ddc-4aa5-a253-de7b2a5a35aehttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/9dab68db-4ddc-4aa5-a253-de7b2a5a35aeLoskutakhttp://social.msdn.microsoft.com/Profile/en-US/?user=Loskutakdatasvcutil error 7015: parameter switch dataservicecollection is not validI am following the <a href="http://msdn.microsoft.com/en-us/library/dd756369.aspx">http://msdn.microsoft.com/en-us/library/dd756369.aspx</a> &quot;How to: Manually Generate Client Data Service Classes (ADO.NET Data Services)&quot; topic in order to generate binding classes for ADO.NET Data Service to be used as data source for ASP.NET components like asp:GridView. I am using .NET 3.5 SP1.<br/><br/>The datasvcutil in .NET 3.5 SP1 does not support /dataservicecollection nor /version command line parameters. Therefore it is impossible to generate classes that supports data binding. When datasvcutil from .NET 4 beta is used, then the classes are generated but then they can't be compiled as there is missing <span style="font-size:x-small">EntitySetAttribute within </span><span style="font-size:x-small">System.Data.Services.Common namespace. According to &quot;http://msdn.microsoft.com/en-us/library/system.data.services.common.aspx&quot; the EntitySetAttribute should be included in .NET 3.5 SP1, but it is not.<br/>Is it here any workaround to actually generate the binding classes and use the ADO.NET dataservice in ASP.NET components with .NET 3.5 SP1 ?</span>Wed, 25 Nov 2009 12:58:21 Z2009-11-26T12:47:51Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/dc8b631e-20a5-48e8-9dc6-348e8593d062http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/dc8b631e-20a5-48e8-9dc6-348e8593d062Jeremy Schaabhttp://social.msdn.microsoft.com/Profile/en-US/?user=Jeremy%20Schaab System.InvalidOperationException: The context is not currently tracking the entity.Racking my brain, please help!  <br/><br/>I am trying to add a record using ADO.NET Dataservices.  Here is my database and code.<br/><br/>table TB_WEB_PROP<br/>column PROP_ID (number) identity<br/>column PROP_NAME (varchar(255))<br/><br/>table TB_WEB_ALERT<br/>column ALERT_ID (number) idenity<br/>column PROP_ID_REL (number) FK is TB_WEB_PROP.PROP_ID<br/><br/>I built an ADO.NET DataModel and exposed using DataServices on the Gateway.  The Navigation properties are showing correctly in the Model.  I can query the TB_WEB_ALERT object with keys sucessfully.  The client is trying to add a record in the TB_WEB_ALERT table, but I cannot get the Foreign Key to work no matter what I try.  I have manyc errors like Context Tracking or Null Values in Second, etc.<br/><br/>Here is hte CODE I am using for the update.  I suspect it is all in here:, my tables above are condensed versions of the real thing.<br/><span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">        public void InsertAlertRecord(GuestCardObject guestCard)<br/>        {<br/>            TB_WEB_ALERT alert = new TB_WEB_ALERT();</span></span></p> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">            try<br/>            {<br/>                service = new RESTPropertyEntities(new Uri(configService));</span></span></p> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">                var propQuery = from TB_WEB_PROP prop in service.TB_WEB_PROP//.Expand(&quot;TB_WEB_ALERT&quot;)<br/>                                where prop.PROP_ID == guestCard.PropId<br/>                                select prop;</span></span></p> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">                </span></span></p> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">                alert.BATH = guestCard.Bath;<br/>                alert.BED = guestCard.Bed;<br/>                alert.CREATE_BY = &quot;ALERTFORM&quot;;<br/>                alert.UPDATE_BY = &quot;ALERTFORM&quot;;<br/>                alert.DATE_FROM = guestCard.DateFrom;<br/>                alert.DATE_TO = guestCard.DateTo;<br/>                alert.EMAIL = guestCard.Email;<br/>                alert.ENABLED_FLAG = true.ToString();<br/>                alert.FIRSTNAME = guestCard.FirstName;<br/>                alert.LASTNAME = guestCard.LastName;<br/>                alert.PHONE = guestCard.PhoneNumber;<br/>                alert.PRICE_FROM = guestCard.PriceFrom;<br/>                alert.PRICE_TO = guestCard.PriceTo;<br/>                alert.TERM = decimal.Parse(guestCard.Term);<br/>                alert.TB_WEB_PROP = new TB_WEB_PROP();<br/>                alert.TB_WEB_PROP.PROP_ID = propQuery.FirstOrDefault().PROP_ID;<br/>                service.MergeOption = System.Data.Services.Client.MergeOption.AppendOnly;</span></span></p> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">                try<br/>                {<br/>                    service.AddToTB_WEB_ALERT(alert);<br/>                    service.AddLink(service.TB_WEB_PROP, &quot;PROP_ID&quot;, alert.TB_WEB_PROP);<br/>                    service.SaveChanges();</span></span></p> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">                }<br/>                catch (Exception ex)<br/>                {<br/>                    throw ex;<br/>                }<br/>                    </span></span></p> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">            }<br/>            catch (Exception ex)<br/>            {<br/>                LogWriter.Log(2, &quot;Exception Inserting Alert Record&quot;, ex);<br/>            }</span></span></p> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">        }</span></span></p>Tue, 27 Oct 2009 01:51:23 Z2009-11-26T11:06:25Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/5ec7c078-ea51-4777-afcd-6747cb8af347http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/5ec7c078-ea51-4777-afcd-6747cb8af347Raymond Amegadjinhttp://social.msdn.microsoft.com/Profile/en-US/?user=Raymond%20AmegadjinADO.NET and Web service problemHi, i have created the following http-endpoint in sql server 08:<br/> <div style="color:Black;background-color:White"> <pre><span style="color:Blue">create</span> ENDPOINT [Tr2] STATE=STARTED <span style="color:Blue">AS</span> HTTP (PATH=N<span style="color:#a31515">'/sql'</span> , PORTS = (CLEAR), AUTHENTICATION = (INTEGRATED), SITE=N<span style="color:#a31515">'localhost'</span> , CLEAR_PORT = 1099, COMPRESSION=DISABLED) <span style="color:Blue">FOR</span> SOAP (WEBMETHOD <span style="color:#a31515">'http://tempuri.org/'</span> .<span style="color:#a31515">'Product'</span> ( <span style="color:Blue">NAME</span> =N<span style="color:#a31515">'[Adventureworks].[dbo].[prProductList]'</span> , <span style="color:Blue">SCHEMA</span> =<span style="color:Blue">DEFAULT</span> , FORMAT=ALL_RESULTS), BATCHES=ENABLED, WSDL=N<span style="color:#a31515">'[master].sys].sp_http_generate_wsdl_defaultcomplexorsimple]'</span> , SESSIONS=DISABLED, SESSION_TIMEOUT=60, <span style="color:Blue">DATABASE</span> =<span style="color:Blue">DEFAULT</span> , NAMESPACE=N<span style="color:#a31515">'http://tempuri.org'</span> , <span style="color:Blue">SCHEMA</span> =STANDARD, CHARACTER_SET=<span style="color:Blue">XML</span> ) go </pre> </div> i then added a web reference to it and try to display the data in the datagrid on click event of a button , with the following code: <div style="color:Black;background-color:White"> <pre>localhost.Tr2 ws = <span style="color:Blue">new</span> tryEmbedded.localhost.Tr2(); dataGrid1.DataSource = ws.Product(); </pre> </div> But when it execute no data is return no error too; Can you help me find what im missing;<br/>Wed, 25 Nov 2009 11:44:12 Z2009-11-25T11:44:13Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/2ebbf8b0-766c-4fa6-970f-4624019f6f23http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/2ebbf8b0-766c-4fa6-970f-4624019f6f23mahbounihttp://social.msdn.microsoft.com/Profile/en-US/?user=mahbouniWCF Data Service problem with complex relationships in db schemaI got my WCF Data Service test app working using a simple database schema but it doesn't work when I add some tables to my DataClasses.dbml file. It works for simple parent child relationships but not with ones that have both parent child and collection relationships. For example I have a set of database tables People, Users and Contacts. Both Users and Contacts inherit from People. However I also have a mappings table UserContactMappings, which allows a User to have a collection of Contacts. It seems that the framework treats this collection relationship as inheritence and breaks the service. Unfortunately I can't ake big changes to the schema as there are NHibernate apps that rely on it.<br/><br/>EDIT: Nevermind, I found out what the real problem is. The primary key properies have to be called ID instead of UserID, ContactID, etc. At least it's only the C# property names - the database column names can stay as is. As for the above collection example, well I'm still not sur if that can be done with WCF Data Services or not. Will have to give it a try.Sat, 21 Nov 2009 15:03:36 Z2009-11-25T06:18:18Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/f232dbb1-f750-43c9-a8c4-97d1e620f334http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/f232dbb1-f750-43c9-a8c4-97d1e620f334Cleyton Jordanhttp://social.msdn.microsoft.com/Profile/en-US/?user=Cleyton%20JordanATOM XML NOT SHOWING IN IE8Hi,<br/><br/>I am using IE8 and VS2008<br/><br/>When I right click my Service.svc file to view in browser, I get the following xml:<br/><br/> <pre lang=x-xml>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot; ?&gt; - &lt;service xml:base=&quot;http://localhost:2873/ADONetServicesTest/Service.svc/&quot; xmlns:atom=&quot;http://www.w3.org/2005/Atom&quot; xmlns:app=&quot;http://www.w3.org/2007/app&quot; xmlns=&quot;http://www.w3.org/2007/app&quot;&gt; - &lt;workspace&gt; &lt;atom:title&gt;Default&lt;/atom:title&gt; - &lt;collection href=&quot;Authors&quot;&gt; &lt;atom:title&gt;Authors&lt;/atom:title&gt; &lt;/collection&gt; - &lt;collection href=&quot;Books&quot;&gt; &lt;atom:title&gt;Books&lt;/atom:title&gt; &lt;/collection&gt; &lt;/workspace&gt; &lt;/service&gt;</pre> However if I try to navigate to the Author entity using the url I do not see an XML document in the browser.<br/><br/>I see a message asking if I want to subscribe to the feed.<br/><br/>1 - Why am not seeing the atom XML? Do I have to configure IE8 to be able to see the xml?<br/><br/>2 - Do I need to install any tool in IE8 to view the atom XML?<br/><br/>Cheers<br/><br/>C <br/><br/><br/>Tue, 24 Nov 2009 10:58:53 Z2009-11-24T22:32:31Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/77769bd8-8955-4bad-997d-b13e1e691a21http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/77769bd8-8955-4bad-997d-b13e1e691a21Tim Rhttp://social.msdn.microsoft.com/Profile/en-US/?user=Tim%20RReturning Entities with Extra Data<span style="font-family:Arial, Helvetica, sans-serif;font-size:14px;border-collapse:collapse;line-height:18px"> <p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;padding:0px;border:0px initial initial">Trying to figure out the best way to accomplish this. So I have a table of Stores with properties:</p> <p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;padding:0px;border:0px initial initial">StoreID, Name, Latitude, Longitude, etc.</p> <p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;padding:0px;border:0px initial initial">I'm using ADO.NET Data Services to create a web service that will show nearby stores given a radius and a coordinate. I made a Service Operation to take the params and return the results as an IQueryable. So far so good.</p> <p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;padding:0px;border:0px initial initial">So right now I have something like:</p> <pre class=prettyprint style="margin-top:0px;margin-right:0px;margin-bottom:10px;margin-left:0px;font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;font-family:Consolas, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New';overflow-x:auto;overflow-y:auto;width:auto;padding:5px;border:0px initial initial"><code style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;font-family:Consolas, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New';padding:0px;margin:0px;border:0px initial initial"><span class=kwd style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:#00008b;padding:0px;margin:0px;border:0px initial initial">return</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"> context</span><span class=pun style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">.</span><span class=typ style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:#2b91af;padding:0px;margin:0px;border:0px initial initial">Stores</span><span class=pun style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">.</span><span class=typ style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:#2b91af;padding:0px;margin:0px;border:0px initial initial">Where</span><span class=pun style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">(...</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">distance calculation</span><span class=pun style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">...);</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"><br/></span></code></pre> <p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;padding:0px;border:0px initial initial">This works great, but I also want to return the <strong style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;font-weight:bold;padding:0px;margin:0px;border:0px initial initial">distance</strong> of each store from the given radius. I have the calculation covered, but how should I include the distance along with the store data? Should I make a class like StoreSearchResult with properties for the Store and the Distance?</p> <p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;padding:0px;border:0px initial initial">If I was just using SQL, I could write a single database query that would return all of the data for the Store, along with a column for the distance. Something like:</p> <pre class=prettyprint style="margin-top:0px;margin-right:0px;margin-bottom:10px;margin-left:0px;font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;font-family:Consolas, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New';overflow-x:auto;overflow-y:auto;width:auto;padding:5px;border:0px initial initial"><code style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;font-family:Consolas, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New';padding:0px;margin:0px;border:0px initial initial"><span class=typ style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:#2b91af;padding:0px;margin:0px;border:0px initial initial">Select</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"> </span><span class=typ style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:#2b91af;padding:0px;margin:0px;border:0px initial initial">StoreID</span><span class=pun style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">,</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"> </span><span class=typ style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:#2b91af;padding:0px;margin:0px;border:0px initial initial">Name</span><span class=pun style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">,</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"> </span><span class=typ style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:#2b91af;padding:0px;margin:0px;border:0px initial initial">Latitude</span><span class=pun style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">,</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"> </span><span class=typ style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:#2b91af;padding:0px;margin:0px;border:0px initial initial">Longitude</span><span class=pun style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">,</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"> </span><span class=pun style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">(</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">calculation</span><span class=pun style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">...)</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"> </span><span class=kwd style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:#00008b;padding:0px;margin:0px;border:0px initial initial">as</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"> </span><span class=typ style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:#2b91af;padding:0px;margin:0px;border:0px initial initial">Distance</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"> <br/></span><span class=kwd style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:#00008b;padding:0px;margin:0px;border:0px initial initial">from</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"> </span><span class=typ style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:#2b91af;padding:0px;margin:0px;border:0px initial initial">Store</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"><br/></span><span class=kwd style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:#00008b;padding:0px;margin:0px;border:0px initial initial">where</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"> </span><span class=pun style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">...</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">distance param</span><span class=pun style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial">...</span><span class=pln style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;color:black;padding:0px;margin:0px;border:0px initial initial"><br/></span></code></pre> <p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;padding:0px;border:0px initial initial">So I'm looking for the best way to send back the original Store data + the distance calculation while still returning IQueryable. I'd prefer not to take an IEnumerable and use AsQueryable...I just feel like it should be possible to keep it &quot;close&quot; to the database query, and I'm probably just missing something.</p> <p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;padding:0px;border:0px initial initial">Thanks!<br/>Tim</p> </span>Sat, 21 Nov 2009 15:22:42 Z2009-11-24T19:00:36Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/e957e696-9885-4f5a-bb97-86c80c09690ehttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/e957e696-9885-4f5a-bb97-86c80c09690eVicente at PlainConceptshttp://social.msdn.microsoft.com/Profile/en-US/?user=Vicente%20at%20PlainConceptsExecuting a service operation that returns a primitive typeHi to all, I'm trying to execute this service operation:<span style="font-size:x-small">  <div style="background-color:white;color:black"> <pre>[WebGet()] <span style="color:blue">public</span> <span style="color:blue">int</span> Add(<span style="color:blue">int</span> a, <span style="color:blue">int</span> b) {<br/> <span style="color:blue">return</span> a + b;<br/>} </pre> </div> <p>In this way:</p> <div style="background-color:white;color:black"> <pre><span style="color:blue">int</span> a = 1; <span style="color:blue">int</span> b = 2; DataServiceQuery&lt;<span style="color:blue">int</span>&gt; query = context.CreateQuery&lt;<span style="color:blue">int</span>(<span style="color:#a31515">&quot;Add&quot;</span>) .AddQueryOption(<span style="color:#a31515">&quot;a&quot;</span>, a) .AddQueryOption(<span style="color:#a31515">&quot;b&quot;</span>, b); <span style="color:blue">int</span> s = query.Execute().First(); </pre> </div> <p><span style="font-size:x-small"></span><span style="font-size:x-small">But I get:</span>   </p> <div style="background-color:white;color:black"> <pre><span style="color:blue">&lt;?</span><span style="color:#a31515">xml</span> <span style="color:red">version</span><span style="color:blue">=</span><span style="color:black">&quot;</span><span style="color:blue">1.0</span><span style="color:black">&quot;</span> <span style="color:red">encoding</span><span style="color:blue">=</span><span style="color:black">&quot;</span><span style="color:blue">utf-8</span><span style="color:black">&quot;</span> <span style="color:red">standalone</span><span style="color:blue">=</span><span style="color:black">&quot;</span><span style="color:blue">yes</span><span style="color:black">&quot;</span><span style="color:blue">?&gt;</span> <span style="color:blue">&lt;</span><span style="color:#a31515">error</span> <span style="color:red">xmlns</span><span style="color:blue">=</span><span style="color:black">&quot;</span><span style="color:blue"><a href="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata&quot;&gt;">http://schemas.microsoft.com/ado/2007/08/dataservices/metadata</a> <span style="color:blue">&lt;</span><span style="color:#a31515">code</span><span style="color:blue">&gt;</span><span style="color:blue">&lt;/</span><span style="color:#a31515">code</span><span style="color:blue">&gt;</span> <span style="color:blue">&lt;</span><span style="color:#a31515">message</span> <span style="color:red">xml:lang</span><span style="color:blue">=</span><span style="color:black">&quot;</span><span style="color:blue">en-US</span><span style="color:black">&quot;</span><span style="color:blue">&gt;</span>Bad Request - Error in query syntax.<span style="color:blue">&lt;/</span><span style="color:#a31515">message</span><span style="color:blue">&gt;</span> <span style="color:blue">&lt;/</span><span style="color:#a31515">error</span><span style="color:blue">&gt;</span> </span><span style="color:black">&quot;</span><span style="color:blue">&gt;</span> </pre> </div> <p>I have an error if I access to this uri : <a href="http://localhost:1135/WebDataService.svc/Add()?a=1&amp;b=2">http://localhost:1135/WebDataService.svc/Add()?a=1&amp;b=2</a><br/><br/>I must use this other one: <a href="http://localhost:1135/WebDataService.svc/Add?a=1&amp;b=2">http://localhost:1135/WebDataService.svc/Add?a=1&amp;b=2</a><br/><br/>But I can consume the service operation if it's parameterless:</p> <div style="background-color:white;color:black"> <pre>[WebGet()] <span style="color:blue">public</span> <span style="color:blue">int</span> Add() { <span style="color:blue">return</span> 4; } </pre> </div> <div style="background-color:white;color:black"> <pre>DataServiceQuery&lt;<span style="color:blue">int</span>&gt; query = context.CreateQuery&lt;<span style="color:blue">int</span>(<span style="color:#a31515">&quot;Add&quot;</span>) <span style="color:blue">int</span> s = query.Execute().First(); </pre> </div> <p>In this way, the value of the integer s is 4.<br/><br/>Could somebody help me, please?<br/><br/>Thanks :)</p> </span>Mon, 23 Nov 2009 16:10:26 Z2009-11-24T03:54:07Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/0da425c1-2eb7-49c4-97ea-f3f4458b0934http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/0da425c1-2eb7-49c4-97ea-f3f4458b0934MicSMithttp://social.msdn.microsoft.com/Profile/en-US/?user=MicSMitTitle RTM WCF Data ServicesMy last recollection ADO.Net Data Services 1.5 CTP2 was the latest  version.  Does title imply that there is something newer called RTM WCF Data Services available ? If so could provide the URL please.<br/>Fri, 20 Nov 2009 08:56:08 Z2009-11-20T17:27:01Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/ac70e807-da1d-470f-9430-185a0b770077http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/ac70e807-da1d-470f-9430-185a0b770077Madden13http://social.msdn.microsoft.com/Profile/en-US/?user=Madden13Period ('.') character in a KeyPredicateHi <div><br/></div> <div>I have a table called User which has an UserPricinpalName as Primary Key.</div> <div><br/></div> <div>When I try to get an user with this request : </div> <div> <div style="color:Black;background-color:White"> <pre>User us = ctx.User.Where(u =&gt; u.UserPrincipalName == userPrincipalName).FirstOrDefault(); </pre> </div> I have an error 404 and no request where sent to the database.</div> <div><br/></div> <div>After some research, I found that the problem is the '.' character in my param userPricinpalName ('<a href="http://localhost:58754/FBI.svc/User('123456789greg.house@serie.us')">123456789greg.house@serie.us</a>')</div> <div><br/></div> <div><a href="http://localhost:58754/FBI.svc/User('123456789greg.house@serie.us')"> <pre>http://localhost:58754/FBI.svc/User('123456789greg.house@serie.us')</pre> </a></div> <div><br/></div> <div>When I remove the '.' character, I still have an error 404 but it's normal because there is no user matching this param (a request is send to the database).</div> <div><br/></div> <div>If I try to use the function Uri.EscapeDataString it doesn't replace the '.' character.</div> <div><br/></div> <div><span style="font-family:'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;font-size:13px;color:#333333;line-height:16px"> <div style="font-weight:inherit;font-style:inherit;font-family:inherit;padding:0px;margin:0px;border:0px initial initial">Does anyone have any thoughts as to what might be the problem?</div> <div style="font-weight:inherit;font-style:inherit;font-family:inherit;padding:0px;margin:0px;border:0px initial initial"><br/></div> <div style="font-weight:inherit;font-style:inherit;font-family:inherit;padding:0px;margin:0px;border:0px initial initial">Thanks in advance.</div> </span></div> <div><br/></div> <div><br/></div>Tue, 17 Nov 2009 14:11:58 Z2009-11-20T15:22:22Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/e3b68d16-ab87-4624-a395-0f7ff3e99393http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/e3b68d16-ab87-4624-a395-0f7ff3e99393Brojakhttp://social.msdn.microsoft.com/Profile/en-US/?user=BrojakBinding to ComboBox using Astoria v1, EF v1, and Silverlight 3I am using the following technologies: Silverlight v3, Astoria v1 and EF v1.   I am having a bit of difficulty showing the value through a ComboBox when the form loads, i.e. nothing is displaying.  But when I click on the drop-down arrow, I can see the list that it is bound and select values just fine.   <div><br/></div> <div>I have a form via a UserControl that displays many properties (for Employee data like FirstName, LastName, Department).  The Department is actually stored as DepartmentID and when I hook up EF to it (i.e. create the conceptual model), a property called Departments is created for the class Employee.  Any advice will be greatly appreciated. <div><br/></div> <div>Here is my XAML code:</div> <div>---------------------------------------</div> <div> <div></div> <pre lang=x-xml>&lt;UserControl.Resources&gt;         &lt;DataTemplate             x:Key=&quot;DepartmentTemplate&quot;&gt;             &lt;StackPanel&gt;                 &lt;TextBlock                     Text=&quot;{Binding DepartmentName, Mode=OneWay}&quot; /&gt;             &lt;/StackPanel&gt;         &lt;/DataTemplate&gt;     &lt;/UserControl.Resources&gt; &lt;ComboBox x:Name=&quot;cboDepartment&quot;                     SelectedItem=&quot;{Binding Mode=TwoWay, Path=DEPARTMENTS}&quot;                     ItemTemplate=&quot;{StaticResource DepartmentTemplate}&quot; /&gt;</pre> <div> <div>Here is my C# code:</div> <div></div> <pre lang="x-c#">void OnControlLoaded(object sender, RoutedEventArgs e) { departments = new Departments(context); cboDepartment.ItemsSource = departments ; cboDepartment.SelectedItemChanged += cboDepartment_SelectedItemChanged; cboDepartment.GetData(); } void cboDepartment_SelectedItemChanged(object sender, PropertyChangedEventArgs&lt;object&gt; e) { Employee emp= DataContext as Employee; Department dept = cboDepartment.SelectedItem as Department; context.SetLink(emp, &quot;DEPARTMENTS&quot;, dept); }</pre> <br/></div> </div> </div>Fri, 20 Nov 2009 01:36:26 Z2009-11-20T01:36:28Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/befbd1d1-fad7-4353-b55c-c47bc0ebdf7ahttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/befbd1d1-fad7-4353-b55c-c47bc0ebdf7aAlexey Zakharovhttp://social.msdn.microsoft.com/Profile/en-US/?user=Alexey%20ZakharovDeleting of Many To Many relation problem.Hi,<br/> <br/> I'm using NHibernate as custom datacontext.<br/> <br/> When I perform delete of many to many assotiation i've got an exception in GetResource method of datacontext. <br/> <br/> I wonder why ADO.NET Data Services tries to get entity which link is deleted using following query:<br/> <br/> {value(NHibernate.Linq.Query`1[Domain.News]).Where(element =&gt; (element.NewsID = 1)).SelectMany(element =&gt; Convert(element.Tags)).Where(element =&gt; (element.TagID = 1))} - this query is fail to execute in GetResource method, because NH have poor support of selectmany.<br/> <br/> News has many tags. Here I have deleted link on Tag from News.<br/> <br/> But I think that query should be simply Select tag by Id.Thu, 19 Nov 2009 05:07:42 Z2009-11-20T05:29:15Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/57ccc46e-1592-4d93-a168-7b39989460b6http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/57ccc46e-1592-4d93-a168-7b39989460b6rjpereshttp://social.msdn.microsoft.com/Profile/en-US/?user=rjperesException When SavingHi, <div><br/></div> <div>I am receiving the dreaded &quot;Non-static method requires a target&quot; exception when calling the SaveChanges method on a proxy to a Data Service.</div> <div>The entity I'm trying to save was added to its respective collection through the AddObject method, and it does show up in the Entities collection. I have also added a link, through the AddLink method, that relates it with another object which is associated with the entity I'm trying to save.</div> <div><br/></div> <div>What could be the cause, any clues?</div> <div><br/></div> <div>Thanks,</div> <div><br/></div> <div>Ricardo Peres</div>Mon, 16 Nov 2009 11:18:22 Z2009-11-19T12:43:02Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/872f17c1-521e-4481-8ba2-84a650f47503http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/872f17c1-521e-4481-8ba2-84a650f47503Aavanihttp://social.msdn.microsoft.com/Profile/en-US/?user=AavaniConnection to remote databasehi,<br/>I am trying to connect to a remote database server using ADO.NET data services.<br/>I can sucessfully create the EDM from existing table and even i can browse the data service from visual studio by 'View in Browser' option.<br/>But when i publish the data service on IIS, i am unable to browse the data service. It throws an error saying 'Login failed for <em>my machine name' .<br/></em>Am i missing out on some setting ?<br/><br/><br/>Thanks,<br/>Avani Tue, 10 Nov 2009 04:45:27 Z2009-11-19T10:34:28Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/09597b1d-a7fa-490e-ad0d-9a28cc09aa5fhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/09597b1d-a7fa-490e-ad0d-9a28cc09aa5fDaCodeBoyhttp://social.msdn.microsoft.com/Profile/en-US/?user=DaCodeBoyWhat's the best way to manage context in an ADO.NET Data Services call?We need to store the user's authentication and profile information at the beginning of the request and access it in various places (think: QueryInterceptors.)  Note that we obviously would only want to persist this data across <strong>one</strong> request.  Where is a legitimate place to store this data and access it later?  Do we have access to HttpContext?  How about Thread Local Storage?  Does CallContext work?  Any help would be appreciated.  Thanks!Wed, 18 Nov 2009 16:34:17 Z2009-11-24T15:18:54Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/eb3047df-743a-4b49-b6cb-aaf2262efeachttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/eb3047df-743a-4b49-b6cb-aaf2262efeacAavanihttp://social.msdn.microsoft.com/Profile/en-US/?user=AavaniCRUD operations for Foreign key relationshipshi,<br/>Can someone please tell me how are the CRUD operations performed, when a table has foreignkey relationships ?<br/>Any tutorials/codesnippets available for that ?<br/><br/>Thanks in advance,<br/>AvaniFri, 21 Aug 2009 13:21:37 Z2009-11-18T11:09:05Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/9e4f9861-4b44-4cb7-81a8-1483df95b960http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/9e4f9861-4b44-4cb7-81a8-1483df95b960IkeLikesToBikehttp://social.msdn.microsoft.com/Profile/en-US/?user=IkeLikesToBikeJSON date isn't UTC<p align=left><font face=Arial size=2>--------------</font></p> <p>If I retrieve a JSON payload from an ADO.NET Data Services service, a date is returned as:</p> <p align=left> </p> <p align=left>/Date([ticks])/</p> <p align=left> </p> <p align=left>There is no consideration of timezone or UTC.  The date value arrives as is with no change in offset from the datetime field value in SQL Server.</p> <p align=left> </p> <p align=left>If I create a Date object in JavaScript passing [ticks] to the Date constructor, JavaScript assumes UTC ticks and adjusts accordingly.  Of course I could store UTC dates in SQL Server which is better in many situations anyway.</p> <p align=left> </p> <p align=left><font face=Arial size=2>--------------</font></p> <p align=left>If I create a WCF method that returns a JSON payload and that method:</p> <p align=left> - Performs a Linq to SQL (not EF, as with ADO.NET Data Services) query that retrieves the same datetime value from SQL Server</p> <p align=left> - Returns the datetime value as a DateTime type within a DataContract object </p> <p align=left> </p> <p align=left>...the date is returned as:</p> <p align=left> </p> <p align=left>/Date([ticks][+/-UTC offset])/</p> <p align=left> </p> <p align=left>Then, if I create a Date object in JavaScript, the expected UTC adjustment produces a correct local time.</p> <p> </p> <p align=left>--------------</p> <p align=left>1)  Is there any way to get ADO.NET Data Services to return the UTC version of the JSON date as WCF does?</p> <p align=left>2)  Is ASP.NET Ajax built to handle these differences automatically?  I'm using ExtJs so I haven't tested this one.</p> <p align=left>3)  Does the JavaScript Date object handle some of these differences?  I'd guess no since, correct me if I'm wrong, the &quot;/Date.../&quot; format is Microsoft proprietary.</p> <p align=left> </p> <p align=left>Thanks...</p>Fri, 29 Aug 2008 18:37:09 Z2009-11-16T18:07:45Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/8e90c1c9-952f-4207-a226-bacb252aad05http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/8e90c1c9-952f-4207-a226-bacb252aad05Rob Vighttp://social.msdn.microsoft.com/Profile/en-US/?user=Rob%20VigNamed Pipes ErrorI setup an ADO.NET Data Service and it works fine locally. I deployed it to my server with the correct Connection string and parameters. I'm getting a SQL Named Pipes error (see below)<br /><br />Is there anything else I need to do to the client or the server?<br /><br />Thanks,<br />Robert<br /><br /><br /> <div class="e"><span class="b"><strong><span style="color: #ff0000; font-family: Courier New;">&nbsp;</span></strong></span> <span style="color: #0000ff;"><span class="m">&lt;?</span><span class="pi">xml version="1.0" encoding="utf-8" standalone="yes" </span><span class="m">?&gt;</span></span></div> <div class="e"> <div class="c" style="margin-left: 1em; text-indent: -2em;"><a class="b" onclick="return false" href="http://social.msdn.microsoft.com/Forums/en-US/#" onfocus="h()"><strong><span style="color: #ff0000; font-family: Courier New;">-</span></strong></a> <span class="m"><span style="color: #0000ff;">&lt;</span></span><span class="t"><span style="color: #990000;">error</span></span><span class="ns"><span style="color: #ff0000;"> xmlns</span></span><span class="m"><span style="color: #0000ff;">="</span></span><strong class="ns"><span style="color: #ff0000;">http://schemas.microsoft.com/ado/2007/08/dataservices/metadata</span></strong><span style="color: #0000ff;"><span class="m">"</span><span class="m">&gt;</span></span></div> <div> <div class="e"> <div style="margin-left: 1em; text-indent: -2em;"><span class="b"><strong><span style="color: #ff0000; font-family: Courier New;">&nbsp;</span></strong></span> <span class="m"><span style="color: #0000ff;">&lt;</span></span><span class="t"><span style="color: #990000;">code</span></span> <span class="m"><span style="color: #0000ff;">/&gt;</span></span></div> </div> <div class="e"> <div style="margin-left: 1em; text-indent: -2em;"><span class="b"><strong><span style="color: #ff0000; font-family: Courier New;">&nbsp;</span></strong></span> <span class="m"><span style="color: #0000ff;">&lt;</span></span><span class="t"><span style="color: #990000;">message</span></span><span class="ns"><span style="color: #ff0000;"> xml:lang</span></span><span class="m"><span style="color: #0000ff;">="</span></span><strong class="ns"><span style="color: #ff0000;">en-US</span></strong><span style="color: #0000ff;"><span class="m">"</span><span class="m">&gt;</span></span><span class="tx"><strong>An error occurred while processing this request.</strong></span><span class="m"><span style="color: #0000ff;">&lt;/</span></span><span class="t"><span style="color: #990000;">message</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span></div> </div> <div class="e"> <div class="c" style="margin-left: 1em; text-indent: -2em;"><a class="b" onclick="return false" href="http://social.msdn.microsoft.com/Forums/en-US/#" onfocus="h()"><strong><span style="color: #ff0000; font-family: Courier New;">-</span></strong></a> <span class="m"><span style="color: #0000ff;">&lt;</span></span><span class="t"><span style="color: #990000;">innererror</span></span><span class="ns"><span style="color: #ff0000;"> xmlns</span></span><span class="m"><span style="color: #0000ff;">="</span></span><strong class="ns"><span style="color: #ff0000;">xmlns</span></strong><span style="color: #0000ff;"><span class="m">"</span><span class="m">&gt;</span></span></div> <div> <div class="e"> <div style="margin-left: 1em; text-indent: -2em;"><span class="b"><strong><span style="color: #ff0000; font-family: Courier New;">&nbsp;</span></strong></span> <span class="m"><span style="color: #0000ff;">&lt;</span></span><span class="t"><span style="color: #990000;">message</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span><span class="tx"><strong>The underlying provider failed on Open.</strong></span><span class="m"><span style="color: #0000ff;">&lt;/</span></span><span class="t"><span style="color: #990000;">message</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span></div> </div> <div class="e"> <div style="margin-left: 1em; text-indent: -2em;"><span class="b"><strong><span style="color: #ff0000; font-family: Courier New;">&nbsp;</span></strong></span> <span class="m"><span style="color: #0000ff;">&lt;</span></span><span class="t"><span style="color: #990000;">type</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span><span class="tx"><strong>System.Data.EntityException</strong></span><span class="m"><span style="color: #0000ff;">&lt;/</span></span><span class="t"><span style="color: #990000;">type</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span></div> </div> <div class="e"> <div style="margin-left: 1em; text-indent: -2em;"><span class="b"><strong><span style="color: #ff0000; font-family: Courier New;">&nbsp;</span></strong></span> <span class="m"><span style="color: #0000ff;">&lt;</span></span><span class="t"><span style="color: #990000;">stacktrace</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span><span class="tx"><strong>at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean&amp; closeStoreConnectionOnFailure) at System.Data.EntityClient.EntityConnection.Open() at System.Data.Objects.ObjectContext.EnsureConnection() at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator() at System.Data.Objects.ObjectQuery`1.GetEnumeratorInternal() at System.Data.Objects.ObjectQuery.System.Collections.IEnumerable.GetEnumerator() at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable) at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService) at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description) at System.Data.Services.DataService`1.HandleRequest()</strong></span><span class="m"><span style="color: #0000ff;">&lt;/</span></span><span class="t"><span style="color: #990000;">stacktrace</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span></div> </div> <div class="e"> <div class="c" style="margin-left: 1em; text-indent: -2em;"><a class="b" onclick="return false" href="http://social.msdn.microsoft.com/Forums/en-US/#" onfocus="h()"><strong><span style="color: #ff0000; font-family: Courier New;">-</span></strong></a> <span class="m"><span style="color: #0000ff;">&lt;</span></span><span class="t"><span style="color: #990000;">internalexception</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span></div> <div> <div class="e"> <div style="margin-left: 1em; text-indent: -2em;"><span class="b"><strong><span style="color: #ff0000; font-family: Courier New;">&nbsp;</span></strong></span> <span class="m"><span style="color: #0000ff;">&lt;</span></span><span class="t"><span style="color: #990000;">message</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span><span class="tx"><strong>A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)</strong></span><span class="m"><span style="color: #0000ff;">&lt;/</span></span><span class="t"><span style="color: #990000;">message</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span></div> </div> <div class="e"> <div style="margin-left: 1em; text-indent: -2em;"><span class="b"><strong><span style="color: #ff0000; font-family: Courier New;">&nbsp;</span></strong></span> <span class="m"><span style="color: #0000ff;">&lt;</span></span><span class="t"><span style="color: #990000;">type</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span><span class="tx"><strong>System.Data.SqlClient.SqlException</strong></span><span class="m"><span style="color: #0000ff;">&lt;/</span></span><span class="t"><span style="color: #990000;">type</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span></div> </div> <div class="e"> <div style="margin-left: 1em; text-indent: -2em;"><span class="b"><strong><span style="color: #ff0000; font-family: Courier New;">&nbsp;</span></strong></span> <span class="m"><span style="color: #0000ff;">&lt;</span></span><span class="t"><span style="color: #990000;">stacktrace</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span><span class="tx"><strong>at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean&amp; closeStoreConnectionOnFailure)</strong></span><span class="m"><span style="color: #0000ff;">&lt;/</span></span><span class="t"><span style="color: #990000;">stacktrace</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span></div> </div> <div><span class="b"><strong><span style="color: #ff0000; font-family: Courier New;">&nbsp;</span></strong></span> <span class="m"><span style="color: #0000ff;">&lt;/</span></span><span class="t"><span style="color: #990000;">internalexception</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span></div> </div> </div> <div><span class="b"><strong><span style="color: #ff0000; font-family: Courier New;">&nbsp;</span></strong></span> <span class="m"><span style="color: #0000ff;">&lt;/</span></span><span class="t"><span style="color: #990000;">innererror</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span></div> </div> </div> <div><span class="b"><strong><span style="color: #ff0000; font-family: Courier New;">&nbsp;</span></strong></span> <span class="m"><span style="color: #0000ff;">&lt;/</span></span><span class="t"><span style="color: #990000;">error</span></span><span class="m"><span style="color: #0000ff;">&gt;</span></span></div> </div> </div>Tue, 13 Oct 2009 16:09:32 Z2009-11-16T17:52:28Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/eaf81091-f85f-4e94-9599-211eb06394cehttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/eaf81091-f85f-4e94-9599-211eb06394ceSamuel Parkhttp://social.msdn.microsoft.com/Profile/en-US/?user=Samuel%20Parkado.net data service very poor perfomance Hi <br/><br/>I am testing on ado.net data service. I just created web application with SQL server there is one table and about 900 rows in database table. <br/>After building application i just test to get all entities from web browser. but it takes about 5 or 6 minutes to get all data in internet webbrowser <br/>I don't know this is normal situation or not. source table only has 5 columns. <br/>Do I miss something ? <br/><br/>Regards,<br/>Park<br/>Mon, 16 Nov 2009 03:46:02 Z2009-11-16T09:57:32Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/3b72ade0-f211-467f-80b5-42594f629a85http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/3b72ade0-f211-467f-80b5-42594f629a85fs - abhttp://social.msdn.microsoft.com/Profile/en-US/?user=fs%20-%20abanyway to suppress error on relationship checking on mapped dummy stored procedure/functionmy applicaiton does not allow delete on certain tables, furthermore, some table that has attributes that is used within the table despite some FK are used to constraint the values<br/>these FK constraint becomes liability during mapping for some update store procedure: producing tons of errors for not dealing with relationships. same goes for delete store procedure<br/><br/><br/>the way it is I lost all advantages that canb e gained from edm on ado.net  Furthermore I need some visual display of data anyways.  I was hping I can use the entity to update in the datridview and hence reduing the amount of manaul mapping of stored prcedure mapping.<br/><br/><br/>Did go off in a tangent. I was trying to follow some of <br/> <a href="http://social.msdn.microsoft.com/Search/en-US?query=how to use linq on ado .net entity model&amp;refinement=112&amp;ac=8">http://social.msdn.microsoft.com/Search/en-US?query=how%20to%20use%20linq%20on%20ado%20.net%20entity%20model&amp;refinement=112&amp;ac=8</a><br/> <a href="http://msdn.microsoft.com/en-us/library/bb738488.aspx">http://msdn.microsoft.com/en-us/library/bb738488.aspx</a><br/>Sat, 14 Nov 2009 17:12:19 Z2009-11-14T17:12:19Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/832edcc7-d6ef-4551-bc81-98efb15d9ac0http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/832edcc7-d6ef-4551-bc81-98efb15d9ac0jtanghttp://social.msdn.microsoft.com/Profile/en-US/?user=jtangClarification needed on Edm.Decimalin The CSDL, document, the Decimal is described as<br/> <br/> &quot;2.2.1.7 Decimal<br/> The Decimal type represents numeric values with fixed precision and scale. The required precision and scale can be specified using its optional Precision and Scale facets. This type can describe a numeric value ranging from negative 10^255 + 1 to positive 10^255 -1.&quot;<br/> <br/> However, in the APDSU, Decimal is defined as <br/> decimalUriLiteral = decimalLiteral<br/> (&quot;M&quot;/&quot;m&quot;)<br/> decimalLiteral = sign 1*29DIGIT<br/> [&quot;.&quot; 1*29DIGIT]<br/> <br/> Somewhere I have read decimal uses 96 bits, so 29DIGIT makes sense. Can someone clarify the range of &quot;negative 10^255 + 1 to positive 10^255 -1.&quot;? Thanks!<br/>Sun, 08 Nov 2009 18:32:21 Z2009-11-12T20:09:55Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/675da2b5-c09b-4a6a-a283-604d5f9b1954http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/675da2b5-c09b-4a6a-a283-604d5f9b1954Mike9990http://social.msdn.microsoft.com/Profile/en-US/?user=Mike9990DataSet in SilverLight, what to replace?<p align=left>Our software uses DataSet to send/receive data using WCF and consume it in the Windows Forms.  But now we want to move to SilveLight, or use it in some areas to show the data on the web without using ASP.NET.  But I noticed that SilverLight does not accept DataSet! This creates the problems for us, because DataSet is used in these parts!  Now, what do you think is the bset way?</p> <p align=left> </p> <p align=left>Thank you for your help in advance.</p> <p align=left> </p> <p align=left>Mike</p>Thu, 21 Aug 2008 19:19:40 Z2009-11-12T18:27:34Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/b8507d35-3def-4f7b-ade1-bec926a4feb2http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/b8507d35-3def-4f7b-ade1-bec926a4feb2TMulderhttp://social.msdn.microsoft.com/Profile/en-US/?user=TMulderBad Request - Error in query syntaxHi,<br/><br/>When I use the CreateQuery to call a webget function on the server, I get &quot;Error in query syntax&quot;. However the call is being made and processed on the server without problems. Only on the client that result can somehow not be processed. <br/>When I use context.Execute(url) then it all works. I need to use the CreateQuery.<br/>Any ideas?<br/><br/>(VS2010 Beta2)<br/><br/>Client Code that does not work:<br/><br/>DataServiceQuery dsquery = searchEntitiesContext.CreateQuery&lt;BusinessEntitySearchResult&gt;(&quot;BusinessEntitySearch&quot;)<br/>    .AddQueryOption(&quot;searchText&quot;, &quot;'a*'&quot;).AddQueryOption(&quot;maxCount&quot;, &quot;10&quot;);<br/>var list = dsquery.Execute();<br/><br/>Client code that works:<br/><br/>IEnumerable&lt;BusinessEntitySearchResult&gt; list = searchEntitiesContext.Execute&lt;BusinessEntitySearchResult&gt;(new Uri(query, UriKind.Relative));<br/><br/><br/>Server code:<br/><br/>[System.ServiceModel.Web.WebGet]<br/>public ObjectResult&lt;BusinessEntitySearchResult&gt; BusinessEntitySearch(string searchText, int maxCount){<br/> String userName = string.Empty;<br/>     if (System.Web.HttpContext.Current != null &amp;&amp; System.Web.HttpContext.Current.User != null &amp;&amp; !string.IsNullOrEmpty(System.Web.HttpContext.Current.User.Identity.Name)) {<br/>      userName = System.Web.HttpContext.Current.User.Identity.Name;<br/>     }<br/>     ObjectResult&lt;BusinessEntitySearchResult&gt; searchResult = (new FullTextSearches()).BusinessEntitySearchInternal(searchText, maxCount, string.Empty, CurrentDataSource, userName);<br/>     return searchResult;<br/>}<br/><br/> Mon, 09 Nov 2009 16:09:18 Z2009-11-11T23:57:30Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/3aec953d-3876-4055-9e62-83c4f6ef1af1http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/3aec953d-3876-4055-9e62-83c4f6ef1af1Madden13http://social.msdn.microsoft.com/Profile/en-US/?user=Madden13EntityReference not accessibleHi <div><br/></div> <div>I'm try to access the automatic generated EntityReference attribute for an object created by EDM. I can access the object &quot;FaxCountry&quot; itself without problem. However, when I try access the &quot;FaxCountryReference&quot; it is neither visible in the browser window (even if the BrowsableAttribute is changed to true) nor compiled by the compiler. </div> <div> <div><br/></div> <div>Does anyone have any thoughts as to what might be the problem?</div> <div><br/></div> <div>Thanks in advance.</div> <div><br/></div> <div><br/></div> <div><br/></div> <div><br/></div> <div> <div style="color:Black;background-color:White"> <pre> <span style="color:Gray">///</span> <span style="color:Gray">&lt;summary&gt;</span> <span style="color:Gray">///</span><span style="color:Green"> There are no comments for FaxCountry in the schema.</span> <span style="color:Gray">///</span> <span style="color:Gray">&lt;/summary&gt;</span> [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute(<span style="color:#A31515">&quot;RTE.FBI.Model&quot;</span>, <span style="color:#A31515">&quot;FK_SubscriptionData_Countries&quot;</span>, <span style="color:#A31515">&quot;Country&quot;</span>)] [global::System.Xml.Serialization.XmlIgnoreAttribute()] [global::System.Xml.Serialization.SoapIgnoreAttribute()] [global::System.Runtime.Serialization.DataMemberAttribute()] <span style="color:Blue">public</span> Country FaxCountry { <span style="color:Blue">get</span> { <span style="color:Blue">return</span> ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(<span style="color:Blue">this</span>)).RelationshipManager.GetRelatedReference&lt;Country&gt;(<span style="color:#A31515">&quot;RTE.FBI.Model.FK_SubscriptionData_Countries&quot;</span>, <span style="color:#A31515">&quot;Country&quot;</span>).Value; } <span style="color:Blue">set</span> { ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(<span style="color:Blue">this</span>)).RelationshipManager.GetRelatedReference&lt;Country&gt;(<span style="color:#A31515">&quot;RTE.FBI.Model.FK_SubscriptionData_Countries&quot;</span>, <span style="color:#A31515">&quot;Country&quot;</span>).Value = value; } } <span style="color:Gray">///</span> <span style="color:Gray">&lt;summary&gt;</span> <span style="color:Gray">///</span><span style="color:Green"> There are no comments for FaxCountry in the schema.</span> <span style="color:Gray">///</span> <span style="color:Gray">&lt;/summary&gt;</span> [global::System.ComponentModel.BrowsableAttribute(<span style="color:Blue">false</span>)] [global::System.Runtime.Serialization.DataMemberAttribute()] <span style="color:Blue">public</span> global::System.Data.Objects.DataClasses.EntityReference&lt;Country&gt; FaxCountryReference { <span style="color:Blue">get</span> { <span style="color:Blue">return</span> ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(<span style="color:Blue">this</span>)).RelationshipManager.GetRelatedReference&lt;Country&gt;(<span style="color:#A31515">&quot;RTE.FBI.Model.FK_SubscriptionData_Countries&quot;</span>, <span style="color:#A31515">&quot;Country&quot;</span>); } <span style="color:Blue">set</span> { <span style="color:Blue">if</span> ((value != <span style="color:Blue">null</span>)) { ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(<span style="color:Blue">this</span>)).RelationshipManager.InitializeRelatedReference&lt;Country&gt;(<span style="color:#A31515">&quot;RTE.FBI.Model.FK_SubscriptionData_Countries&quot;</span>, <span style="color:#A31515">&quot;Country&quot;</span>, value); } } } </pre> </div> </div> </div>Tue, 10 Nov 2009 08:10:09 Z2009-11-12T07:08:49Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/34db8a00-4750-4fd1-9edf-b37123403acbhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/34db8a00-4750-4fd1-9edf-b37123403acbSam Muellerhttp://social.msdn.microsoft.com/Profile/en-US/?user=Sam%20MuellerBest practices for exposing DTOs via Service Operations on ADO.NET Data Services<span style="font-family:monospace;font-size:13px;white-space:pre-wrap">I would like to know what the best practices are for utilizing and exposing DTOs in an ADO.NET Data Service. As much as I love all the possibilities that can be achieved with projections, there are scenarios in which I'll need to do a custom query that returns a DTO which doesn't conform to an entity in my domain model. I've tried to find more information on this subject, but so far I've only read that custom service operations can only return entities from the Entity Data Model that is being exposed by the service. Is my only option to create an Entity in the model that isn't mapped to a table in the database? Because when I try this method, I get the error:</span> <div><span style="font-family:monospace;font-size:small"><span style="font-size:13px;white-space:pre-wrap"><br/></span></span></div> <div><span style="font-family:monospace;font-size:13px;white-space:pre-wrap">The server encountered an error processing the request. The exception message is 'Service operation 'MY_DTO' produces instances of type 'MY_DTO', but there are no visible entity sets for that type. The service operation should be hidden or a resource set for type 'MY_DTO' should be made visible.'.</span></div> <div><span style="font-family:monospace;font-size:small"><span style="font-size:13px;white-space:pre-wrap"><br/></span></span></div> <div><span style="font-family:monospace;font-size:13px;white-space:pre-wrap">here is the service operation:  </span></div> <div><span style="font-family:monospace;font-size:13px;white-space:pre-wrap"> </span></div> <div><span style="font-family:monospace;font-size:small"><span style="font-size:13px;white-space:pre-wrap"> <div style="color:Black;background-color:White"> <pre>[WebGet] <span style="color:Blue">public</span> IEnumerable&lt;MY_DTO&gt; TestDto(<span style="color:Blue">int</span> parentId) { <span style="color:Blue">return</span> CurrentDataSource.MY_ENTITY .Where(x =&gt; x.Parent.Id == parentId) .Select(x =&gt; <span style="color:Blue">new</span> MY_DTO { Id = x.Id, Name = x.Name, ChildCount = x.Children.Count }); } </pre> </div> <br/></span></span></div>Mon, 09 Nov 2009 22:32:20 Z2009-11-19T00:26:00Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/a5cb527d-4a55-46b4-8836-378a503e4f46http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/a5cb527d-4a55-46b4-8836-378a503e4f46jeff_akbmhttp://social.msdn.microsoft.com/Profile/en-US/?user=jeff_akbmSlow Performance from Silverlight Hello,<br><br>We are experiencing very slow CRUD operations using ADO.NET data services from Silverlight.  Our model has about 350 entities.  The response times are in the area of 1-2 minutes.<br><br>Substituing our production model for a small test model, the reponse times are fine.<br><br>In both scenario's, the executed code is the same and mirrors that of the Silverlight ADO.NET Data Services documentation.  Our database doesn't have much data in it, so I don't believe that is the cause of the issue.<br><br>Is anyone else working with large models and experiencing this behavior?<br><br>Thanks,<br>JeffMon, 12 Jan 2009 16:16:15 Z2009-11-10T12:50:37Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/ac29d299-8f4a-4e3f-840e-2264b516c5b2http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/ac29d299-8f4a-4e3f-840e-2264b516c5b2Sam Muellerhttp://social.msdn.microsoft.com/Profile/en-US/?user=Sam%20MuellerSupport for count (and other aggregations) in projections?I was wondering if there is going to be any support for $count (or some other syntax) that would allow aggregations when projecting on an entity.  For instance, if I had a Customer entity that had a list of Orders, would it be possible to only get the Id, Name, and Order count of each Customer?  This would be immensely useful!Mon, 09 Nov 2009 21:15:28 Z2009-11-11T23:45:59Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/88f76eef-360d-42ab-b340-4e413d400073http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/88f76eef-360d-42ab-b340-4e413d400073michael dbhttp://social.msdn.microsoft.com/Profile/en-US/?user=michael%20dbUpload files?<font size=2><span style="font-family:Arial">Hi Guys,<br><br>Is it possible to upload files either via Entities or ServiceOperations? If so can you point me at some documentation or an example of how it's done?<br><br>Thanks,<br>Michael<br></span></font>Wed, 16 Jul 2008 04:39:23 Z2009-11-10T16:59:17Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/f18437d7-415c-4159-9c50-7b501a114cabhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/f18437d7-415c-4159-9c50-7b501a114cabEllen_Bhttp://social.msdn.microsoft.com/Profile/en-US/?user=Ellen_BNullable Foreign KeysHi there,<br/><br/>We've got the following (for explanatory reasons simplified) situation. There is an Order table and an Items table and between those there's a foreign key relationship defined. The foreign key column on the Item table does allow null values so Items may exist without an Order. Creating this relationship: <br/><br/>Order 0..1 --&lt;&gt; * Item<br/><br/>For example, there are 2 Items in the database, one belonging to an Order and another one standing on its own (i.e. has a null value in the foreign key column). Now when i do a request for the one belonging to an Order like this:<br/><br/><a href="http://localhost:4717/WebDataService1.svc/Items(1)/Orders">http://localhost:4717/WebDataService1.svc/Items(1)/Orders</a><br/><br/>I get the parent Order as result back from the service which is logical as there is a valid foreign key relationship. Now when i do a request for the unrelated Item like this:<br/><br/><a href="http://localhost:4717/WebDataService1.svc/Items(2)/Orders">http://localhost:4717/WebDataService1.svc/Items(2)/Orders</a><br/><br/>I won't get a response at all. The server returns just nothing, like it is hanging. Shouldn't the server at least return something? Like when you query for Items for an Order which has none you at least get an empty result back which you can handle in your application...just hanging there seems so useless ;-)<br/><br/>I hope i'm clear enough<br/><br/>Note: This a readonly DataService<br/><br/>Thanks,<br/><br/>E<br/><br/>Mon, 26 Oct 2009 15:47:34 Z2009-11-09T12:25:25Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/199f42ed-5e40-433b-b517-8d3a8ef1c924http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/199f42ed-5e40-433b-b517-8d3a8ef1c924jtanghttp://social.msdn.microsoft.com/Profile/en-US/?user=jtangUpdateEntity with rebinding link In the APDSU spec 2.2.7.3.1 UpdateEntity Request section, it says the user can rebind the link using the UpdateEntity request. <br/> <br/> I am trying to rebind the link of Territories('60001') to region to Region(7001), but it doesn't works.  When I issue a get entity request, the Region associated with the Territories('60001') is still Region(6001).<br/> <br/> Here is my put request. <br/> <br/> PUT //NorthwindWeb/NorthwindDataService.svc/Territories('60001') HTTP/1.1<br/> <br/> &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot;?&gt;<br/> &lt;entry xml:base=&quot;http://host:port/NorthwindWeb/NorthwindDataService.svc/&quot; xmlns:d=&quot;http://schemas.microsoft.com/ado/2007/08/dataservices&quot; xmlns:m=&quot;http://schemas.microsoft.com/ado/2007/08/dataservices/metadata&quot; xmlns=&quot;http://www.w3.org/2005/Atom&quot;&gt;<br/>   &lt;category term=&quot;NorthwindModel.Territories&quot; scheme=&quot;http://schemas.microsoft.com/ado/2007/08/dataservices/scheme&quot; /&gt;<br/>    &lt;link rel=&quot;related/Region&quot; href=&quot;http://host:port/NorthwindWeb/NorthwindDataService.svc/Region(7001)&quot;/&gt;<br/>   &lt;content type=&quot;application/xml&quot;&gt;<br/>     &lt;m:properties&gt;<br/>       &lt;d:TerritoryDescription xml:space=&quot;preserve&quot;&gt;Territory 003                             &lt;/d:TerritoryDescription&gt;<br/>       &lt;d:TerritoryID&gt;60001&lt;/d:TerritoryID&gt;<br/>     &lt;/m:properties&gt;<br/>   &lt;/content&gt;<br/> &lt;/entry&gt;<br/> <br/> Did I miss something? Thanks.<br/> <br/> <br/>Wed, 16 Sep 2009 22:37:44 Z2009-11-08T18:15:35Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/011ec67a-197b-4001-93bf-ab8955dc0e07http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/011ec67a-197b-4001-93bf-ab8955dc0e07Bentonhttp://social.msdn.microsoft.com/Profile/en-US/?user=BentonSaveChanges() throws exception: The response to this POST request did not contain a 'location' header. That is not supported by this client.<div>Hi there,</div> <div><br/></div> <div>I'm trying to insert  a new record into 'A160Pedimentos' table.</div> <div><br/></div> <div> <div style="color:Black;background-color:White"> <pre><span style="color:Blue">public</span> <span style="color:Blue">void</span> ProcesaDS() { <span style="color:Blue">var</span> proxy = <span style="color:Blue">new</span> IntermediaEntities(<span style="color:Blue">new</span> Uri(<span style="color:#A31515">&quot;http://myserver/MyDataService.svc/&quot;</span>)); <span style="color:Blue">var</span> pedim = <span style="color:Blue">new</span> A160Pedimentos { fechapago = DateTime.Now, clavecliente = <span style="color:#A31515">&quot;0001&quot;</span>, firmapago = <span style="color:#A31515">&quot;FIRma&quot;</span> }; proxy.AddToA160Pedimentos(pedim); proxy.SaveChanges(); <span style="color:Green">// Exception here</span> } </pre> </div> <div><br/></div> Problem is... <strong>proxy.SaveChanges()</strong> throws the following exception:</div> <div><br/></div> <div><br/></div> <div> <pre>System.NotSupportedException was unhandled Message=&quot;The response to this POST request did not contain a 'location' header. That is not supported by this client.&quot; Source=&quot;System.Data.Services.Client&quot; StackTrace: at System.Data.Services.Client.DataServiceContext.SaveAsyncResult.HandleOperationResponse(HttpWebRequest httpWebRequest, HttpWebResponse response) at System.Data.Services.Client.DataServiceContext.SaveAsyncResult.BeginNextChange(Boolean replaceOnUpdate) at System.Data.Services.Client.DataServiceContext.SaveChanges(SaveChangesOptions options) at System.Data.Services.Client.DataServiceContext.SaveChanges() at Pedimentos160.Procesar.ProcesaDS() in C:\Pedimentos160\Procesar.cs:line 121 at Pedimentos160.Program.Main(String[] args) in C:\Pedimentos160\Program.cs:line 17 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel) at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly() at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData) at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext) at System.Activator.CreateInstance(ActivationContext activationContext) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: </pre> <br/></div> <div>Can someone please help?</div> <div><br/></div> <div>Regards,</div> <div><br/></div> <div>-Jorge</div> <div><br/></div> <div><br/></div> <div><br/></div> <div><br/></div> <div><br/></div> <div><br/></div> <div><br/></div> <div><br/></div>Fri, 06 Nov 2009 18:46:40 Z2009-11-06T21:51:34Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/eecd6a74-4384-498e-9847-8582f54e417ehttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/eecd6a74-4384-498e-9847-8582f54e417eJamie Thomsonhttp://social.msdn.microsoft.com/Profile/en-US/?user=Jamie%20ThomsonFeature request, expose known data-typesHi,<br/>I have a requirement at the moment to publish webcal calendars from event data that is stored in a database. A webcal calendar is, as I understand it, little more than a datafeed in a well-known format (although admittedly that format isn't XML). I should say I'm by no means an authority on webcal at the time of writing.<br/><br/>It occurred to me that there is nothing in the MSFT stack that makes this is easy to do and it further occurred to me that perhaps ADO.Net Data Services might be a good fit seeing as publishing data on the web is its raison d'etre. <br/><br/>Hence, a feature request:<br/>Please give ADO.Net Data Services the ability to publish data in well-known data formats. My motivator for this is webcal data but I suspect that are multitudes of data formats that would fit very well for this feature (e.g. microformats).<br/><br/>THoughts?<br/><br/>thanks<br/>Jamie <hr class=sig> <a href="http://sqlblog.com/blogs/jamie_thomson/">http://sqlblog.com/blogs/jamie_thomson/</a> | <a href="http://jamiethomson.spaces.live.com/">http://jamiethomson.spaces.live.com/</a> | <a href="http://twitter.com/jamiet">@jamiet</a>Tue, 29 Sep 2009 08:26:07 Z2009-11-06T01:11:38Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/0890b407-0f86-480e-a0f0-7e6551bf0240http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/0890b407-0f86-480e-a0f0-7e6551bf0240jtanghttp://social.msdn.microsoft.com/Profile/en-US/?user=jtangJSON format of some number types are stored in double quote?In the 2.2.6.3.1 section of APDSU spec, the JSON serialization format of the following number types are stored in a double quotation:<br/> <br/> Edm.Decimal jsonDecimal<br/> Edm.Double jsonDouble<br/> Edm.Int64 jsonInt64<br/> Edm.Single jsonSingle<br/> <br/> However, from our testing, only EMD.Int64 value are stored in &quot;&quot;. The other three types do not have &quot;&quot; around it.<br/> <br/> Can you verify this? Is this because the spec is wrong? Or the implementation is wrong?<br/> <br/> Thanks!<br/>Thu, 05 Nov 2009 17:57:20 Z2009-11-06T20:59:15Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/e866c753-ba87-4f15-a2f6-3c5e34389f57http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/e866c753-ba87-4f15-a2f6-3c5e34389f57mschumackerhttp://social.msdn.microsoft.com/Profile/en-US/?user=mschumackerDataServiceContext stored in session - cannot serializeWe have an application that uses the ADO Data services.  The use of these services has been great and really helped us develop our product quickly.  What we have been doing, though, is storing our dataContext in Session of our ASP.NET app.  Each session (user) gets their own copy of the dataContext which makes for less trips as it is caching the information and retrieving it only once.<br/><br/>This has worked great for us, until now.  We have a need to push Session out to Sql Server and therefore need to make sure that all our classes are Serializable.  I am able to make most of the classes this, including my dataContext class, however since it is inheriting from DataServiceContext, it fails.  DataServiceContext is not serializable.<br/><br/>Any ideas on what to do here.  I was hoping to keep the dataContext in Session, however it's not looking good.  That will cause me to rewrite a bunch of code and will definitely cause multiple trips to the database and back if I can't keep it in Session.<br/><br/>I appreciate any and all help on this.<br/>Matt<br/>Wed, 28 Oct 2009 18:40:51 Z2009-11-06T20:59:35Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/316d8c97-ab9a-47ff-ab71-65a4df38c307http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/316d8c97-ab9a-47ff-ab71-65a4df38c307Jifhttp://social.msdn.microsoft.com/Profile/en-US/?user=JifLoad testing the Data ServicesCan anyone suggest a simple way to load test DataServices?&nbsp;Wed, 14 Oct 2009 07:16:01 Z2009-11-05T21:56:39Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/7b3ac209-7ab6-45ca-a72b-73a955343baehttp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/7b3ac209-7ab6-45ca-a72b-73a955343baeMSDN Studenthttp://social.msdn.microsoft.com/Profile/en-US/?user=MSDN%20StudentSupport for SQL 2005I am writing a small product for the banking industry. The product will be sold to customers who would be running SQL 2005 or SQL 2008.<br/> <br/> I need to expose some of my database objects (tables / views / stored procedures) as web services.<br/> <br/> I am ready to baseline .NET framework 3.5 to run the web services... but the database can be either SQL 2005 or 2008.<br/> <br/> Can you please confirm if I can use ADO.NET Data Services? or will I have to write web services manually?<br/> <br/> Regards,<br/> Abhishek<br/> <br/>Tue, 03 Nov 2009 17:17:33 Z2009-11-04T00:01:32Z