WCF Data Services [formerly known as ADO.NET Data Services] (Pre-Release) ForumPost feedback, questions and suggestions related to Pre-Release (Alpha Preview, CTP, Beta) versions of WCF Data Services (formerly known as ADO.NET Data Services and Project "Astoria").© 2009 Microsoft Corporation. All rights reserved.Fri, 27 Nov 2009 20:44:25 Zf3c45499-4f1a-40ae-abd2-695a531f9293http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/abfc21eb-6cb5-4e83-b177-9289941658f9http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/abfc21eb-6cb5-4e83-b177-9289941658f9Alexey Zakharovhttp://social.msdn.microsoft.com/Profile/en-US/?user=Alexey%20ZakharovCode only and ADO.NET Data ServicesHow to supply objectcontext generated by builder to ado.net data services?<br/><br/>Because of context is created by builder I cannot just put as generic parameter. <br/><br/>Or I'm missing something?Sat, 21 Nov 2009 19:50:58 Z2009-11-27T20:44:25Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/e5b465d0-6c5d-4441-8a90-7942800eff24http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/e5b465d0-6c5d-4441-8a90-7942800eff24Luciano Correiahttp://social.msdn.microsoft.com/Profile/en-US/?user=Luciano%20CorreiaComplex query problemHi guys,<br/> <br/> <span class="short_text"><span style="background-color:#ffffff" title="Ola pessoal, estou tentando fazer uma consulta no Ado"> I'm trying to make a query in Ado</span> </span> , <span class="short_text"><span style="background-color:#ffffff" title="Ola pessoal, estou tentando fazer uma consulta no Ado, mas não estou conseguindo">but I can not.</span> </span> <br/> <br/> <br/> <pre lang="x-c#">string modulefunctionCode = string.Concat(Helpers.LoginInfo.CurrentModule, Helpers.Tables.CLIENTES, PermissionFunctions.View); //List&lt;int&gt; deniedAccess = GetEmpresasWithDeniedAccess(modulefunctionCode); // Justa an Exemplo List&lt;int&gt; deniedAccess = new List&lt;int&gt;() {0, 1, 2, 3} IQueryable&lt;Cliente&gt; result = DBEntities.Clientes.Expand(&quot;Empresa&quot;) .Where(r =&gt; (deniedAccess.Contains(r.Empresa.EmpresaId) == false || r.Empresa == null)) .OrderBy(c =&gt; c.RazaoSocial); // the problem is here, how can i do that? .Where(r =&gt; (deniedAccess.Contains(r.Empresa.EmpresaId) == false || r.Empresa == null))</pre> the error:<br/> <br/> The expression ((value(System.Collections.Generic.List`1[System.Int32]).Contains([10007].Empresa.EmpresaId) = False) || ([10007].Empresa = null)) is not supported.<hr class="sig">Luciano CorreiaTue, 24 Nov 2009 19:43:05 Z2009-11-26T16:48:11Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/15ff97b9-a07b-4f1b-8473-b709cbddb15bhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/15ff97b9-a07b-4f1b-8473-b709cbddb15bDave Russellhttp://social.msdn.microsoft.com/Profile/en-US/?user=Dave%20RussellOne-way Navigation properties not supported?I've created a one-way navigation property in my EF1 model and it works fine.<br/> <br/> However, when I try to access this model using WCF Data Services 1.5CTP1 I get an error indicating that the number of properties on the Entity in my model doesn't match the number of properties on the Entity in my class (Presumably, the generated code from &quot;Add Service Reference&quot; ?)<br/> <br/> So, my question is.....Does the 1.5CTP1 code generation support one-way navigation properties on EF1 models? (Or am I doing something wrong....)<br/> <br/> DaveThu, 26 Nov 2009 16:05:39 Z2009-11-26T16:05:40Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/83b44979-b34d-45c6-9b60-abbb14750fcehttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/83b44979-b34d-45c6-9b60-abbb14750fcegdsmithhttp://social.msdn.microsoft.com/Profile/en-US/?user=gdsmithADO.NET Data Service returning "A Potentially Dangerous Request.Path value was detected from the client (&).<p>I have an ADO.NET Data Service written in Visual Studio 2010 Beta 2 running IIS 6.1 on Windows 7 x64 (Phew!).<br/><br/>This service is returning the following message to the client when I query for <a href="http://localhost/Service/QueryService.svc/Departments('T%26E'">http://localhost/Service/QueryService.svc/Departments('T%26E'</a>)<br/><br/>&quot;<span style="font-family:Arial">A potentially dangerous Request.Path value was detected from the client (&amp;).&quot;<br/><br/>The reason that I am querying for T%26E is that I have an entity (Department) with a primary key (char) of &quot;T&amp;E&quot;.  IIS seems to be intercepting this request and returning the error.  All I have in my web application is this ADO.NET Data Service, with a web.config of:<br/><br/>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br/>&lt;configuration&gt;<br/>    &lt;system.web&gt;<br/>        &lt;compilation debug=&quot;true&quot; targetFramework=&quot;4.0&quot;&gt;<br/>            &lt;assemblies&gt;<br/>                &lt;add assembly=&quot;System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot; /&gt;<br/>            &lt;/assemblies&gt;<br/>        &lt;/compilation&gt;<br/></span><span style="font-family:Arial">        &lt;authentication mode=&quot;Windows&quot; /&gt;<br/>    &lt;/system.web&gt;<br/>    <br/>    &lt;system.serviceModel&gt;<br/>        &lt;behaviors&gt;<br/>            &lt;serviceBehaviors&gt;<br/>                &lt;behavior&gt;<br/>                    &lt;serviceMetadata httpGetEnabled=&quot;true&quot; /&gt;<br/>                    &lt;serviceDebug includeExceptionDetailInFaults=&quot;false&quot; /&gt;<br/>                &lt;/behavior&gt;<br/>            &lt;/serviceBehaviors&gt;<br/>        &lt;/behaviors&gt;<br/>        &lt;serviceHostingEnvironment aspNetCompatibilityEnabled=&quot;true&quot; /&gt;<br/>    &lt;/system.serviceModel&gt;<br/>&lt;/configuration&gt;<br/><br/>Has anyone had a similar problem?  I have a feeling it is to do with IIS request validation, but I cannot see how to disable it for the service.  There are lots of examples of how to turn of request validation for asp.net pages, but nothing for services.  Am I missing something?</span></p>Thu, 26 Nov 2009 00:50:44 Z2009-11-26T05:11:00Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/0987dae1-e162-4f46-b20a-733edca4a1b2http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/0987dae1-e162-4f46-b20a-733edca4a1b2Marcelo de Aguiarhttp://social.msdn.microsoft.com/Profile/en-US/?user=Marcelo%20de%20AguiarExposing Abstract classes over Ria Service 2010 PreviewI have created an empty Entity Data Model, create a new Entity named <strong>Dabases </strong>and made it abastract, next I have create a new entity named &quot;<strong>SqlDatase</strong>&quot; that inherits from &quot;<strong>Databases</strong>&quot; entity. <div><br/></div> <div>Next I created a new Domain Service to expose my entities, but the <strong>Databases</strong> is disable makes sense as it is abstract, but what about <strong>SqlDatabase</strong>? why cant I expose it?</div> <div><br/></div> <div><br/></div> <div>Using VS2010, Ria Services Preview.</div><hr class="sig">The way of C#Mon, 23 Nov 2009 21:30:04 Z2009-11-25T11:30:30Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/507ca8a9-9724-4ce2-b546-841608fec032http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/507ca8a9-9724-4ce2-b546-841608fec032Luciano Correiahttp://social.msdn.microsoft.com/Profile/en-US/?user=Luciano%20CorreiaCTP 2 Windows Forms (Data Binding)I am planning to develop an application using ado data service V1.5 CTP2.<br/> <br/> I tested version 1.0 of the ado data service and not have seen the use of DataBinding, and I get a lot of work having to control some property changes using the &quot;SetLink&quot; and &quot;AddLink&quot;.<br/> <br/> In CTP2 version I saw that there is a feature of &quot;Data Binding&quot; that can solve my problem.<br/> <br/> But the description of the Action &quot;Data Binding&quot;, he says it's for WPF and Silverlight. This is my question, because my application will be Windows Forms. <br/> <br/> Can i use the ADO Data Service through a windows forms application?<hr class="sig">Luciano CorreiaMon, 16 Nov 2009 13:03:37 Z2009-11-24T19:28:43Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/81b0db27-ecb5-4893-801c-eb0933625196http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/81b0db27-ecb5-4893-801c-eb0933625196Dave Russellhttp://social.msdn.microsoft.com/Profile/en-US/?user=Dave%20RussellWhat is the best caching strategy?I have a complex app using a dataservices backend.  My app is split into multiple segments through the use of nested master pages, controllers, user controls and so on.  All the segments tend to operate on the same object graph time after time, so I really need to keep a copy locally rather than request it again and again from each individual component......<br/> <br/> If I store the object graph in session, that seems to work fine, but when I have multiple users looking at the same object graph they are each storing their own copy......Not ideal if 1 user adds a new leaf to the graph because the other session can't see it (Can't invalidate session B from session A....).<br/> <br/> If I store the object graph in httpcontext.cache then it works to a point....However, retrieving an object graph from the cache and then using &quot;context.AttachTo&quot; on the root object doesn't seem to attach the rest of the graph to the context, so updates are all messed up.<br/> <br/> I've looked at TryGetEntity and TryGetUri, but documentation and examples of their use is vague / nonexistent.  However, they don't seem to prevent http requests anyway......?<br/> <br/> Can anyone offer some assistance / point me at some best practice docs?<br/> <br/> Dave<br/> <br/>Tue, 24 Nov 2009 15:58:28 Z2009-11-24T15:58:28Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/19b77448-237c-4825-b89d-1aff0667c0f6http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/19b77448-237c-4825-b89d-1aff0667c0f6Jifhttp://social.msdn.microsoft.com/Profile/en-US/?user=JifToObservableEntityCollection ErrorMy app is throwing an error on a clients test pc in the ToObservableEntityCollection() method.  This works fine from other pc's I've tried and using a browser on the RESTful interface produces the correct set of data so I can only assume that the new client somehow has a problem.  His machine is XP but I have tried other XP machines and they are fine.<br/><br/>This doesn't look good for my write once run anywhere the .Net framework is installed theory.  Any ideas what could be the matter?<br/><br/> <pre lang=x-aspx>09:28:34&quot;&quot;System.Data.Services.Client.DataServiceClientException: Error processing response stream. The ATOM entry had an in-stream error. ---&gt; System.Xml.XmlException: Unexpected end of file has occurred. The following elements are not closed: feed, m:inline, link, entry, m:inline, link, entry, feed, m:inline, link, entry, feed. Line 242, position 35. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String arg) at System.Xml.XmlTextReaderImpl.ThrowUnclosedElements() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlSubtreeReader.Read() at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r) at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o) at System.Xml.Linq.XElement.ReadElementFrom(XmlReader r, LoadOptions o) at System.Xml.Linq.XElement.Load(XmlReader reader, LoadOptions options) at System.Xml.Linq.XElement.Load(XmlReader reader) at System.Data.Services.Client.MaterializeAtom.PushBufferedReader(XElement&amp; currentEntry) --- End of inner exception stack trace --- at System.Data.Services.Client.MaterializeAtom.PushBufferedReader(XElement&amp; currentEntry) at System.Data.Services.Client.MaterializeAtom.ReadNextInternal(ClientType currentType, Type expectedType, AtomParseState atom, EntityStates&amp; entityState, Object&amp; currentValue, EpmReaderState readerState) at System.Data.Services.Client.MaterializeAtom.ReadNext(ClientType currentType, Type expectedType, AtomParseState atom, EntityStates&amp; entityState, Object&amp; currentValue, EpmReaderState readerState) at System.Data.Services.Client.MaterializeAtom.MoveNext() at System.Data.Services.Client.ObservableEntityCollection`1.ToObservableEntityCollection(DataServiceContext context, IEnumerable`1 items, String entitySet, EntityChanged entityChanged, EntityRefChanged refChanged, EntityCollectionChanged collectionChanged, ResolveEntitySetName entitySetNameResolver) at System.Data.Services.Client.QueryOperationResponse`1.ToObservableEntityCollection(String entitySet, EntityChanged entityChanged, EntityRefChanged refChanged, EntityCollectionChanged collectionChanged, ResolveEntitySetName entitySetNameResolver) at System.Data.Services.Client.QueryOperationResponse`1.ToObservableEntityCollection() at Nova.Content.Controls.Generic.MVCCommands.SearchCommand`2.&lt;&gt;c__DisplayClass3.&lt;Execute&gt;b__0(IAsyncResult ar)&quot;</pre> Thanks<br/><br/>Sun, 05 Apr 2009 20:27:17 Z2009-11-23T22:45:46Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/f656ab68-b034-4dc0-a410-02a8c79f1963http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/f656ab68-b034-4dc0-a410-02a8c79f1963Sam Muellerhttp://social.msdn.microsoft.com/Profile/en-US/?user=Sam%20MuellerBest practices for exposing DTOs via Service Operations on ADO.NET Data Services version1.5I posted this in the data platform forums, but I didn't get too clear an answer. I would like to know what the best practices are for utilizing and exposing DTOs in an ADO.NET Data Service version 1.5 in VS2010 beta 2. 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.  <div><br/></div> <div>METHOD 1: Nonetheless, I tried the most straightforward approach first; I created a regular CLR class and use it as a DTO and use RegisterKnownType in InitializeService: </div> <div><br/></div> <div> <pre>config.RegisterKnownType(typeof(EntityWithCount));</pre> </div> <div>I use this code for the service operation:</div> <div><br/></div> <div> <div style="color:Black;background-color:White"> <pre>[WebGet] <span style="color:Blue">public</span> IEnumerable GetEntitiesWithCount(<span style="color:Blue">int</span> parentId) { <span style="color:Blue"> return</span> CurrentDataSource.Entity .Where(x =&gt; x.Parent.Id == parentId) .Select(x =&gt; <span style="color:Blue">new</span> EntityWithCount { Id = x.Id, Name = x.Name, ChildCount = x.Children.Count }); } </pre> </div> </div> <div><br/></div> <div>But I get the error: 'Unable to load metadata for return type 'System.Collections.Generic.IEnumerable`1[EntityWithCount]' of method 'System.Collections.Generic.IEnumerable`1[EntityWithCount] GetEntityWithCount(Int32)' </div> <div><br/></div> <div>METHOD 2: 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 to create an unmapped entity in the entity data model, i get this error using it in the ADO.NET Data Service:</div> <div><br/></div> <div>The server encountered an error processing the request. The exception message is 'Service operation 'EntityWithCount' produces instances of type 'EntityWithCount', but there are no visible entity sets for that type. The service operation should be hidden or a resource set for type 'EntityWithCount' should be made visible.'.</div> <div><br/></div> <div>METHOD 3: So finally, i try to create a complex type in the EntityDataModel, and use it as my DTO. This has been the most favorable in the sense that the service wasn't faulting, and I could return my DTO safely from the service operation *assuming* i directly instantiated the objects. However, when actually trying to create a projection query via the ObjectContext:</div> <div> <div style="color:Black;background-color:White"> <pre><span style="color:Blue">return</span> CurrentDataSource.Entity .Where(x =&gt; x.Parent.Id == parentId) .Select(x =&gt; <span style="color:Blue">new</span> EntityWithCount{ Id = x.Id, Name = x.Name, ChildCount = x.Children.Count }).ToList(); </pre> </div> I get the error:</div> <div><br/></div> <div>The entity or complex type 'EntityWithCount' cannot be constructed in a LINQ to Entities query.</div> <div><br/></div> <div>Just by changing the query to an anonymous type: </div> <div> <pre>return CurrentDataSource.Entity .Where(x =&gt; x.Parent.Id == parentId) .Select(x =&gt; <strong>new </strong>{ Id = x.Id, Name = x.Name, ChildCount = x.Children.Count }).ToList();</pre> The query will be successful, but of course I can't return the anonymous type from the service, because i get the same error that i received in method 1! All I'm trying to do is simply handle more complex situations with custom service operations, and expose them on the data service.</div> <div><br/></div> <div>I'm hoping someone can show me the best method to accomplish this, assuming it's even possible at all! Thanks.</div>Wed, 11 Nov 2009 01:42:18 Z2009-11-23T19:20:19Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/a0e48171-6ae6-4633-9b97-baabde3c06bahttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/a0e48171-6ae6-4633-9b97-baabde3c06baDaCodeBoyhttp://social.msdn.microsoft.com/Profile/en-US/?user=DaCodeBoyIs it safe to use HttpContext during a request?Is it safe to use the <a href="http://msdn.microsoft.com/en-us/library/system.web.httpcontext.items.aspx">HttpContext.Items</a> to store/retrieve data that we need access to during the processing of a request to WCF Data Services?  Will that data be available through the life of the request?Thu, 19 Nov 2009 18:37:31 Z2009-11-19T18:37:32Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/93f6d8fb-8a71-4793-96a1-cfa27e02cfdbhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/93f6d8fb-8a71-4793-96a1-cfa27e02cfdbruthjeshttp://social.msdn.microsoft.com/Profile/en-US/?user=ruthjesFiltering on a many-to-many relation impossible?Hi,<br/> I'm building a line-of-business application framework using silverlight and astoria and I've ran into a problem concerning filtering data that is stored in a many-to-many relation. To explain the issue I've created a model that contains a Person entity, each person can have one or more features like brown eyes or gray hair and so on.<br/> The model looks like this:<br/> <br/> Person - PersonFeatureLink - Feature<br/> <br/> I now want to query each person that has the feature 'brown eyes', I came op with the following:<br/> <br/> public void LoadAnyPersonWithBrownEyesAsync()<br/> {<br/>     DemoModel.DemoEntities context = new DemoModel.DemoEntities(new Uri(&quot;WebDataService1_5CTP1.svc&quot;, UriKind.Relative));<br/> <br/>     var query = from p in context.Person<br/>                     .Expand(&quot;PersonFeatureLink/Feature&quot;)<br/>                 <strong>where p.PersonFeatureLink.Any(q =&gt; q.Feature.Description == &quot;BrownEyes&quot;)</strong> <br/>                 select p;<br/> <br/> <br/>     DataServiceQuery&lt;DemoModel.Person&gt; userQuery = (DataServiceQuery&lt;DemoModel.Person&gt;)query;<br/>     userQuery.BeginExecute(new AsyncCallback(OnLoadCollectionComplete), userQuery);<br/> }<br/> <br/> <br/> When executing this code, Astoria reports that the 'Any' method is not supported.<br/> I have tried countless alternative ways to fomulate this query but none of them worked.<br/> <br/> I would really like to know if there is a way to get this query to work. Or maybe someone can provide a workaround.<br/> <br/> Thanks!<br/> Johan<br/> <br/>Thu, 12 Nov 2009 09:28:15 Z2009-11-19T10:32:46Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/4c5ef3c1-d5e9-49bd-9c33-4e563085082bhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/4c5ef3c1-d5e9-49bd-9c33-4e563085082bM.saqibhttp://social.msdn.microsoft.com/Profile/en-US/?user=M.saqibrelation problem in ado.net<span style="font-size:x-small"><span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">i have problem ,if their is no record  in databse for relation<br/><br/>please guid me ,so in database i have to put one record <br/><br/>some code <br/><br/><br/>Dim</span></span><span style="font-size:x-small"> colMaster11 </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">As</span></span><span style="font-size:x-small"> DataColumn<font size=2> <p> </p> </font></span></p> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Dim</span></span><span style="font-size:x-small"> colDetail1 </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">As</span></span><span style="font-size:x-small"> DataColumn<font size=2> <p>colMaster11 = Busgerneral.gerneral.Tables(tableFoood).Columns(</p> </font></span></p> <p><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">&quot;Fid&quot;</span></span><span style="font-size:x-small">)<font size=2> <p>colDetail1 = Busgerneral.gerneral.Tables(tableIngredient).Columns(</p> </font></span></p> <p><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">&quot;Fid&quot;</span></span><span style="font-size:x-small">)<font size=2> <p>relFoodspIngre =</p> </font></span></p> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">New</span></span><span style="font-size:x-small"> DataRelation(</span><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">&quot;RelFoodIng&quot;</span></span><span style="font-size:x-small">, colMaster11, colDetail1, </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">False</span></span><span style="font-size:x-small">) <p>Busgerneral.gerneral.Relations.Add(relFoodspIngre)</p> <font size=2><font size=2> <p> </p> </font><br/><br/><br/>viewManager = </font></span></p> <font size=2> <p><br/><br/><br/>viewManager =</p> </font></span> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">New</span></span><span style="font-size:x-small"> DataViewManager(Busgerneral.gerneral)<br/><span style="font-size:x-small"><font size=2> <p>dtgIng.DataSource =</p> </font></span> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Nothing</span></span></p> <span style="font-size:x-small"> <p>dtgIng.DataSource = viewManager</p> <font size=2> <p>dtgIng.DataMember =</p> </font></span> <p><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">&quot;foodsp.RelFoodIng&quot; ' error come out<br/><br/><br/><br/><br/><br/><br/></span></span></p> </span></p>Sat, 14 Nov 2009 13:41:27 Z2009-11-14T13:41:28Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/a7224aee-2aff-4518-8f77-f3c08cf62f42http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/a7224aee-2aff-4518-8f77-f3c08cf62f42Bineesh AVhttp://social.msdn.microsoft.com/Profile/en-US/?user=Bineesh%20AVAn error occurred while processing this request. ---> System.InvalidOperationException: The boundary delimiter '--batchresponseWhen we do any bacth update the following exception occures eventhough the data is updated in database. Any inputs on this ?<br/> System.Data.Services.Client.DataServiceRequestException: An error occurred while processing this request. ---&gt; System.InvalidOperationException: The boundary delimiter '--batchresponse_bfe43278-f011-493f-a32a-7f4bf2d4c5f1Content-Type: multipart/mixed; boundary=changesetresponse_50871887-18b3-41bd-9194-21fcb9322503--changesetresponse_50871887-18b3-41bd-9194-21fcb9322503Content-Type: application/httpContent-Transfer-Encoding: binaryHTTP/1.1 201 CreatedContent-ID: 1Cache-Control: no-cacheDataServiceVersion: 1.0;Content-Type: application/atom+xml;charset=utf-8Location: https://rpmbusiness.sharepoint.uop.com/RPM.Data.DataService/RPMDataService.svc/Calculation(guid'e00dd159-4c29-45d0-8114-f90671a90d7c')&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot;?&gt;&lt;entry xml:base=&quot;https://rpmbusiness.sharepoint.uop.com/RPM.Data.DataService/RPMDataService.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;&lt;id&gt;https://rpmbusiness.sharepoint.uop.com/RPM.Data.DataService/RPMDataService.svc/Calculation(guid'e00dd159-4c29-45d0-8114-f90671a90d7c')&lt;/id&gt;&lt;title type=&quot;te...' is not valid. Please specify a valid boundary delimiter or make sure that the content length specified is correct.<br/> <br/>    at System.Data.Services.Client.BatchStream.MoveNext()<br/> <br/>    at System.Data.Services.Client.DataServiceContext.SaveResult.&lt;HandleBatchResponse&gt;d__20.MoveNext()<br/> <br/>    at System.Data.Services.Client.DataServiceContext.SaveResult.HandleBatchResponse()<br/> <br/>    --- End of inner exception stack trace ---<br/>Tue, 10 Nov 2009 06:14:12 Z2009-11-11T15:02:37Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/aac235ae-22c3-454f-8f5d-432a8e8aac34http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/aac235ae-22c3-454f-8f5d-432a8e8aac34MarkMcPhersonhttp://social.msdn.microsoft.com/Profile/en-US/?user=MarkMcPhersonGenerated Silverlight 3 Client side entities missing INotifyPropertyChanged interface for Data Services CTP2When creating a WebService reference to a data services v1.5 CTP2 service the generation of the service reference uses the System.Data.Services.Client dll instead of the Microsoft.Data.Services.Client dll provided by CTP2. The server side project for data services references the Microsoft.Data.Services.* dlls and the markup for the .svc file also references the Microsoft.Data.Services.Client dll. The proxy code genereted in the Silverlight client does not have the INotifiedPropertyChanged interface. When trying to load a DataServiceCollection&lt;T&gt; the system generates an error stating the the INotifyPropertyChanged interface is not defined. A reference to System.Data.Services.Client is automatically added by the add service reference function. Changing this to Microsoft.Data.Services.Client will allow the program to compile but not load the DataServiceCollection. VS2008 SP1 on Vista or Win7 gets same result.Tue, 10 Nov 2009 19:02:50 Z2009-11-11T01:49:13Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/0b2d888e-55d1-4d49-9a31-e7e3c996348dhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/0b2d888e-55d1-4d49-9a31-e7e3c996348dGreg Neilsonhttp://social.msdn.microsoft.com/Profile/en-US/?user=Greg%20NeilsonRequest PipelineHas anyone seen any info on the Request Pipeline additions in CTP2? I've seen plenty of posts from the Ado.NET Data Services team and others declaring that there has been improvments made, but I've not seen any detail as yet! Can anyone point to any info on what's possible now as regards working with the request pipeline?<br/><br/>Cheers,<br/>GregMon, 09 Nov 2009 16:19:39 Z2009-11-10T09:54:03Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/794c7338-4b5c-4a63-b878-cd66d16406dahttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/794c7338-4b5c-4a63-b878-cd66d16406daGreg Neilsonhttp://social.msdn.microsoft.com/Profile/en-US/?user=Greg%20NeilsonInitiating a projection from the server side<p>Hi, I've got the new projections feature in CTP2 working in that I can create a URL asking for specific columns and those columns are returned. That's great stuff.<br/><br/>However, what I want to do now is initiate a projection from the server side. I have a service operation which I'd like to return an IQueryable&lt;MyObject&gt; from. However, I want to only return certain columns from within MyObject. I thought something like this would work:</p> <div style="background-color:white;color:black"> <pre> [WebGet] <span style="color:blue">public</span> IQueryable&lt;User&gt; DoQuery(<span style="color:blue">string</span> query) { <span style="color:blue">return</span> (<span style="color:blue">from</span> u <span style="color:blue">in</span> CurrentDataSource.Users <span style="color:blue">select</span> <span style="color:blue">new</span> { Id = u.Id, LastName = u.LastName }).ToList().Select(uu =&gt; <span style="color:blue">new</span> User { Id = uu.Id, LastName = uu.LastName }).AsQueryable(); } </pre> </div> However, although this does return only the field values  I want, the rest of the fields are still put back to the client in each entity (just with null values). Is there any way to shape the return feed so that only those columns I want are returned? I don't want to rely on the client having to specify a $select option on the call to my service operation - I want to force it.<br/><br/>Cheers,<br/>Greg Mon, 09 Nov 2009 14:49:31 Z2009-11-09T14:49:32Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/c5371331-49ff-4960-8842-759c992763dfhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/c5371331-49ff-4960-8842-759c992763dfKWSpaargarenhttp://social.msdn.microsoft.com/Profile/en-US/?user=KWSpaargarenHowto use IDataServiceStreamProviderIs there any information about how to implement the interface <span style="color:#2b91af"><span style="color:#2b91af;font-size:x-small">IDataServiceStreamProvider ?<br/><span style="color:#000000">I can't find any info about the streaming of blobs using this interface.<br/><br/>Any help would be great,<br/><br/>Klaas</span></span></span>Mon, 09 Nov 2009 12:50:19 Z2009-11-09T12:50:19Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/fa1bc1a9-3e4a-4458-b6a9-43f44a58e2cfhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/fa1bc1a9-3e4a-4458-b6a9-43f44a58e2cfJake Wardleyhttp://social.msdn.microsoft.com/Profile/en-US/?user=Jake%20Wardleytwo entity model and two data service inside the same dll?I am using data service against entiry framework, when i  create two entity model in the same class library and create two data service inside this dll, it seems that this method will cause problem? So my questions is : is it possible to put two entity model and two data service inside the same dll and how ? I hope that one expert can help me solve this problem.<br/> <br/> Thanks.Mon, 31 Aug 2009 14:43:23 Z2009-11-04T23:48:51Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/e3fc3f40-d564-43b5-b3b5-d20a60d05dbdhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/e3fc3f40-d564-43b5-b3b5-d20a60d05dbdSergey Kostrukovhttp://social.msdn.microsoft.com/Profile/en-US/?user=Sergey%20KostrukovAddLink, SetLink... between entities in v1.5Dear development team,<br/><br/>Guys, do you have any plans for the v1.5 to remove necessity for manual operation with links between related entities (using AddLink, SetLink etc.)?<br/><br/>Why isn't possible there to simply track relations using subscription on DataServiceCollection's events and/or by a single recursive pass through references inside objects tree during SaveChanges process.<br/><br/>Thank you for you job!<br/>Thu, 29 Oct 2009 17:32:07 Z2009-11-02T19:07:38Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/9e9096b3-5e3a-4372-809b-8ed97b36b8aahttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/9e9096b3-5e3a-4372-809b-8ed97b36b8aaSkeeveSixtyNinehttp://social.msdn.microsoft.com/Profile/en-US/?user=SkeeveSixtyNineWhy doesn't tracked entity send update requestHere there, <div><br/></div> <div>I am wondering if anyone can explain this to me. <span style="font-family:arial, sans-serif;border-collapse:collapse">I have an entity that is tracked by the context using latest 1.5 CTP 2, but when I modify a value of the property and then call BeginSaveChanges, no updates are sent to server.  However, if I do an UpdateObject first - it works just fine.</span></div> <div><span style="font-family:arial, sans-serif;border-collapse:collapse"><br/></span></div> <div><span style="font-family:arial, sans-serif"><span style="border-collapse:collapse">It doesn't make sense to me because I really thought that the context would know when a tracked entity is modified and will therefore save it appropriately.</span></span></div> <div><span style="font-family:arial, sans-serif"><span style="border-collapse:collapse"><br/></span></span></div> <div><span style="font-family:arial, sans-serif"><span style="border-collapse:collapse">I can give code, but I figure plain language might be easier for now. :-)</span></span></div> <div><span style="font-family:arial, sans-serif"><span style="border-collapse:collapse"><br/></span></span></div> <div><span style="font-family:arial, sans-serif"><span style="border-collapse:collapse">Thanks!</span></span></div>Tue, 27 Oct 2009 18:35:41 Z2009-10-29T10:38:00Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/bc87c30d-89a2-454e-9e9a-23e56c78cf9chttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/bc87c30d-89a2-454e-9e9a-23e56c78cf9cGregory Sheltonhttp://social.msdn.microsoft.com/Profile/en-US/?user=Gregory%20Sheltonspecifying a mime type for a specific property's $value operator<p>VS2010 B2, ADO.NET Data Service backed by an Entity Framework model of an SQL Server 2008 AdventureWorks database.<br/><br/>Calling <a href="http://localhost/AdventureWorks.svc/ProductPhotoes(69)/ThumbNailPhoto/$value">http://localhost/AdventureWorks.svc/ProductPhotoes(69)/ThumbNailPhoto/$value</a> returns an image of bicycle, as expected.  Apparently, there is some special magic somewhere that indicates the mime type or IE just knows it's an image.  I think the later.<br/><br/>However, I'm more intrested in returning an mp3 from the database and specifying a mime-type.  So I've updated a single record in the AW database and replaced the ThumbNailPhoto varbinary(max) contents with a Coldplay mp3.  When I run the same query as above, I'm prompted to save the file.  <br/><br/>My next step was to create a Service Operation called GetProductAudio that returns the binary data.  I used the [System.Data.Services.MimeType(&quot;GetProductAudio&quot;, &quot;audio/mpeg&quot;)] attribute on the DS class and it works exactly as expected.  I query the service and Viva La Vida starts playing in Windows Media Player.<br/><br/>The /ThumbNailPhoto/$value and GetProductAudio are retreiving and returning the same data, the only difference is that GetProductAudio specifies a mime type.<br/><br/>1.<strong> How do I specify the mime type for ThumbNailPhoto so when I use the $value operator the binary data comes down with a mime type in the response header?</strong>  From other posts I've read, it sounds like I should be able to specify a MimeType=&quot;audio/mpeg&quot; attribute in the EF CSDL for the ThumbNailPhoto property, but I've had no luck in doing this.  <a href="http://social.msdn.microsoft.com/Forums/en/adodotnetdataservices/thread/05b3bec2-ebed-4fc0-bb5b-e2d3be5fe3b7">http://social.msdn.microsoft.com/Forums/en/adodotnetdataservices/thread/05b3bec2-ebed-4fc0-bb5b-e2d3be5fe3b7</a> and <a href="http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/818a7491-45ef-4bce-9c4a-bbcfd2151785/">http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/818a7491-45ef-4bce-9c4a-bbcfd2151785/</a> and <a href="http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/f0a559be-1681-43ce-8c91-5eed289df24f">http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/f0a559be-1681-43ce-8c91-5eed289df24f</a><br/><br/>The xmlns being used in the examples above don't seem to exist in VS2010 B2.  It seems like it would be easier to modify the CSDL with an attribute than create a Service Operation everytime you want to specify a mime type for a property's $value operator.<br/><br/>2. Of lesser importance.  <strong>Why is the System.Data.Services.MimeTypeAttribute marked as AllowMultiple = false?  </strong>It seems as though I would need to decorate the Data Service class with a MimeType attribute for each ServiceOperation that needed a specific mime type specified.  So if I had 3 Service Operations that I wanted to control the Mime Type, how would I do that if they were all different types? <br/><br/>Thanks,<br/><br/>Greg<br/><br/><br/></p>Thu, 29 Oct 2009 00:16:59 Z2009-10-29T00:16:59Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/b5d0af0b-ce31-4f69-b3de-5a58cfd101bdhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/b5d0af0b-ce31-4f69-b3de-5a58cfd101bdDave Russellhttp://social.msdn.microsoft.com/Profile/en-US/?user=Dave%20RussellServiceOperations and Boolean Parameters in a VB clientGuys,<br /> I'm using 1.5CTP1 and I've just spent a couple of hours trying to work out why my client-side code always gave me &quot;Bad Request&quot; error when I called my Service Operation, but I could call it just fine using the URL directly.<br /> <br /> It turns out that a boolean in vb.net equates to &quot;True&quot; or &quot;False&quot; in the query string, but a boolean parameter to a service operation can only be accepted as &quot;true&quot; or &quot;false&quot;.<br /> <br /> No big deal, I've just put an IIF(param,&quot;true&quot;,&quot;false&quot;) around it but I thought you would want to know so you can fix it in the next version :)<br /> <br /> DaveWed, 14 Oct 2009 11:40:37 Z2009-10-14T11:40:37Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/33480903-538e-4050-996e-1ae9deaf966bhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/33480903-538e-4050-996e-1ae9deaf966blee dhttp://social.msdn.microsoft.com/Profile/en-US/?user=lee%20dInotifyPropertychanged and implemnting custom logic<p>I have a situation where I would like to do some calculation&nbsp; when a property changes(similar to qantity of a product changing&nbsp; and Total has to be updated).<br />what is the best way to do this.&nbsp; where would the code be executed?<br /><br />Thanks</p><hr class="sig">http://leeontech.wordpress.com/Mon, 12 Oct 2009 17:54:06 Z2009-10-13T14:17:19Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/a70e1638-10f6-471c-97d0-a88fe63bb523http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/a70e1638-10f6-471c-97d0-a88fe63bb523jogi724http://social.msdn.microsoft.com/Profile/en-US/?user=jogi724Getting Row Count in ADO.Net Data Services(w/ Silverlight). Please help!Hi,<br /><br />I read through Peter Qian's article about returning the total count of entities here:<br /><a href="http://blogs.msdn.com/peter_qian/archive/2009/03/18/getting-row-count-in-ado-net-data-services.aspx">http://blogs.msdn.com/peter_qian/archive/2009/03/18/getting-row-count-in-ado-net-data-services.aspx</a><br /><br />And I can't seem to figure out how to get the total count.&nbsp; The following example doesn't work in Silverlight because the 2nd line is a Synchronous call:<br /><br /> <p><span style="font-size: x-small; color: #0000ff; font-family: Courier New;">var q = (from c in ctx.CreateQuery&lt;Customers&gt;(&ldquo;/Customers&rdquo;).IncludeTotalCount().Take(5) select c) as DataServiceQuery&lt;Customers&gt;;<br /></span><span style="font-size: x-small; color: #0000ff; font-family: Courier New;">var results = q.Execute() as QueryOperationResponse&lt;Customers&gt;;<br /></span><span style="font-size: x-small; color: #0000ff; font-family: Courier New;">long countValue = results.TotalCount;<br /></span><br />Is there a way to get to the QueryOperationResponse from a Silverlight client?&nbsp; Or at this point, do I need to start parsing the atom myself?<br /><br />Thanks. -jogi</p>Mon, 12 Oct 2009 18:18:43 Z2009-10-12T21:19:12Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/b18961af-63e6-480b-b4e6-c311aa4fa690http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/b18961af-63e6-480b-b4e6-c311aa4fa690tcksofthttp://social.msdn.microsoft.com/Profile/en-US/?user=tcksoftSystem.Data.Services.Client referenced incorrectly for CTP2I have been following this post to get started with the ADO.NET Data Services 1.5 CTP2 and Silverlight 3:<a href="http://blogs.msdn.com/astoriateam/archive/2009/09/01/introduction-to-data-binding-in-ctp2.aspx"><br/>http://blogs.msdn.com/astoriateam/archive/2009/09/01/introduction-to-data-binding-in-ctp2.aspx</a><br/><br/>It very specifically says to make sure Microsoft.Data.Services.Client is included after adding the Web Service Reference to the Silverlight app.  Every time I add the web reference, I continue to get System.Data.Services.Client instead.  I have followed all the steps, but continue to get the wrong one.<br/><br/>Subsequently, I am getting the following (possibly) related error when trying to use the data service:<br/><br/>&quot;An attempt to track an entity or complex type failed because the entity or complex type 'MyApp.MyDataSvc.Member' does not implement the INotifyPropertyChanged interface.&quot;  -&gt; BTW: &quot;Member&quot; is the name of the table.<br/><br/>Has anyone else run into this same issue or have any suggestions?<br/><br/>Thanks,<br/>Tom<br/>Sat, 19 Sep 2009 07:53:50 Z2009-11-04T23:44:54Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/3079572f-f072-49b1-8c50-a878e616c83bhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/3079572f-f072-49b1-8c50-a878e616c83blee dhttp://social.msdn.microsoft.com/Profile/en-US/?user=lee%20dSide by side installation of CTP 2Can the CTP 2 be installed side by side with the version that shipped with .net 3.5 sp1?<br /><br />thx<hr class="sig">http://leeontech.wordpress.com/Tue, 06 Oct 2009 19:39:45 Z2009-10-12T14:37:24Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/b3e9dce6-73ff-4b30-ae3b-760bd1825fa2http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/b3e9dce6-73ff-4b30-ae3b-760bd1825fa2Maciej Olesinskihttp://social.msdn.microsoft.com/Profile/en-US/?user=Maciej%20OlesinskiProblem with CTP2 when using DLinq, QueryInterceptor and $expand<p>Hello,</p> <p>I have been running Linq to SQL context with ADO.NET Data Services in various projects for a while now. In most cases I have been using it along with query interceptors and $expand instruction and had no problems. Today I installed CTP2 to give it a try and encountered nasty problem as follows.</p> <p>While trying to access URL: http://localhost:64944/DataService.svc/Classes?$expand=Members</p> <p>Error message: Could not translate expression 'p.Members.Where(o =&gt; (o.GuildId = 1))' into SQL and could not treat it as a local expression.</p> <p>Stack trace:</p> <p>at System.Data.Linq.SqlClient.ObjectReaderCompiler.Generator.Generate(SqlNode node, LocalBuilder locInstance)<br />at System.Data.Linq.SqlClient.ObjectReaderCompiler.Generator.GenerateExpressionForType(SqlExpression expr, Type type, LocalBuilder locInstance)<br />at System.Data.Linq.SqlClient.ObjectReaderCompiler.Generator.GenerateSearchedCase(SqlSearchedCase ssc)<br />at System.Data.Linq.SqlClient.ObjectReaderCompiler.Generator.Generate(SqlNode node, LocalBuilder locInstance)<br />at System.Data.Linq.SqlClient.ObjectReaderCompiler.Generator.GenerateExpressionForType(SqlExpression expr, Type type, LocalBuilder locInstance)<br />at System.Data.Linq.SqlClient.ObjectReaderCompiler.Generator.GenerateAssignValue(MetaDataMember mm, LocalBuilder locInstance, SqlExpression expr, LocalBuilder locStoreInMember)<br />at System.Data.Linq.SqlClient.ObjectReaderCompiler.Generator.GenerateMemberAssignment(MetaDataMember mm, LocalBuilder locInstance, SqlExpression expr, LocalBuilder locStoreInMember)<br />at System.Data.Linq.SqlClient.ObjectReaderCompiler.Generator.GenerateNew(SqlNew sn)<br />at System.Data.Linq.SqlClient.ObjectReaderCompiler.Generator.Generate(SqlNode node, LocalBuilder locInstance)<br />at System.Data.Linq.SqlClient.ObjectReaderCompiler.Generator.GenerateExpressionForType(SqlExpression expr, Type type, LocalBuilder locInstance)<br />at System.Data.Linq.SqlClient.ObjectReaderCompiler.Generator.GenerateBody(ILGenerator generator, SqlExpression expression)<br />at System.Data.Linq.SqlClient.ObjectReaderCompiler.CompileDynamicMethod(Generator gen, SqlExpression expression, Type elementType)<br />at System.Data.Linq.SqlClient.ObjectReaderCompiler.Compile(SqlExpression expression, Type elementType)<br />at System.Data.Linq.SqlClient.SqlProvider.GetReaderFactory(SqlNode node, Type elemType)<br />at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)<br />at System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable&amp;lt;T&amp;gt;.GetEnumerator()<br />at System.Data.Services.Providers.BasicExpandProvider.ExpandedQueryable`1.GetEnumerator()<br />at System.Data.Services.Providers.BasicExpandProvider.ExpandedQueryable`1.System.Collections.IEnumerable.GetEnumerator()<br />at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable)<br />at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService)<br />at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description)<br />at System.Data.Services.DataService`1.HandleRequest()</p> <p>Looking at the stack trace it seems the query tree composed by Data Services is invalid for DLinq to process, as it composed my query interceptor, but in a way that made it unparsable.</p> <p>My interceptor was:</p> <p>[QueryInterceptor("Members")]<br />public Expression&lt;Func&lt;Member, bool&gt;&gt; LimitGuild()<br />{<br />&nbsp; &nbsp;return o =&gt; o.GuildId == 1;<br />}</p> <p>btw I made also a test and recreated equivalent context for Entity Framework and all was fine, so it seems the issue is limited only to L2S.</p> <p>Maciej</p>Thu, 08 Oct 2009 15:23:36 Z2009-10-09T07:33:29Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/d67665e3-d8dd-45a0-a306-fdc79d262ad8http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/d67665e3-d8dd-45a0-a306-fdc79d262ad8VIVEK YJAhttp://social.msdn.microsoft.com/Profile/en-US/?user=VIVEK%20YJAIs it possible to create RESTful web services using ASP.NET 2.0?Hi All,<br/><br/>Is it possible to create RESTful web services using ASP.NET 2.0? <br/><br/>If Yes then please let me know how it can be done?<br/><br/>Your earliest response on this matter would be highly appreciable.<br/><br/>Thanks in advance.Mon, 03 Aug 2009 06:00:38 Z2009-09-30T09:31:43Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/300845ec-736b-4745-9d21-ec76cedad14ehttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/300845ec-736b-4745-9d21-ec76cedad14eDudeSmileshttp://social.msdn.microsoft.com/Profile/en-US/?user=DudeSmilesCannot Find Some SqlServer.Management objects<p>I have some C# code in .Net 3.5 to find the disk drive of where our product's SQL Server database files are stored (the code also does a few other database management-related tasks). I've been using something like this:</p> <div style="background-color:white;color:black"> <pre><span style="color:blue">using</span> Microsoft.SqlServer.Management.Common; <span style="color:blue">using</span> Microsoft.SqlServer.Management.Smo; <span style="color:blue">using</span> System.Data.SqlClient; . . . <span style="color:green">// Connect to SQL Server to gain access to the database.</span> SqlConnection sqlConnection = <span style="color:blue">new</span> SqlConnection(<span style="color:#a31515">&quot;MyConnectionString&quot;</span>); ServerConnection serverConnection = <span style="color:blue">new</span> ServerConnection(sqlConnection); Server server = <span style="color:blue">new</span> Server(serverConnection); <span style="color:blue">foreach</span> (FileGroup fg <span style="color:blue">in</span> server.Databases[<span style="color:#a31515">&quot;MyDatabase&quot;</span>].FileGroups) <span style="color:blue">foreach</span> (DataFile f <span style="color:blue">in</span> fg.Files) { <span style="color:green">// Get drive of where data and log files are stored</span> } <span style="color:green">// I also access other objects, such as...</span> <span style="color:blue">double</span> dataSpaceUsed = server.Databases[<span style="color:#a31515">&quot;CEMLink&quot;</span>].DataSpaceUsage; <span style="color:blue">double</span> indexSpaceUsed = server.Databases[<span style="color:#a31515">&quot;CEMLink&quot;</span>].IndexSpaceUsage; </pre> </div> <p>In 4.0, however, this code will not compile because it cannot find the <em>Microsoft.SqlServer.Management.Common.Server</em> object. If I set the project's Target Framework to 3.5 this code works great, but as soon as I change the Target Framework to 4.0 I loose the <em>Server</em> object. I have references to <em>Microsoft.SqlServer.ConnectionInfo, Microsoft.SqlServer.Management.Sdk.Sfc, Microsoft.SqlServer.Smo </em>and <em>Microsoft.SqlServer.SqlEnum.</em><br/><br/>Anyone know where I can find the equivalent of this object in .Net 4.0? Or have an idea of how I can find out the disk drive of where our database files are stored? Thanks!<br/><br/>Side-Note: The ADO.NET Data Services is probably not the best place to post this issue (my apologies), but I wasn't sure where <em>was</em> best. So thanks for everyone's consideration.</p>Sat, 26 Sep 2009 00:58:57 Z2009-10-09T04:18:16Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/23cb7452-c405-4f80-a34d-24678e995b37http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/23cb7452-c405-4f80-a34d-24678e995b37ruthjeshttp://social.msdn.microsoft.com/Profile/en-US/?user=ruthjesAstoria CTP2, entities not showing up in webdataservice.Hi,<br/> I've just upgraded from CTP1 to CTP2 and I'm trying to update my project to use CTP2. I have created a new webdataservice using the CTP2 template and made it point to the same entity framework datamodel I was already using with CTP1.<br/> When I set the webdataservice as the start page and run the application, all I see is:<br/> <br/> &lt;? xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot; ?&gt;<br/> - &lt; service xml:base =&quot; http://localhost:60425/WebDataService2.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;<br/> - &lt; workspace &gt;<br/>   &lt; atom:title &gt; Default &lt;/ atom:title &gt;<br/>   &lt;/ workspace &gt;<br/>   &lt;/ service &gt;<br/> <br/> I have created an empty project and tried it again but the results were the same..<br/> Any idea?<br/> <br/> Best regards,<br/> JohanWed, 09 Sep 2009 14:18:29 Z2009-11-04T23:45:27Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/07776f51-6295-4548-be2e-3819e11b483ehttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/07776f51-6295-4548-be2e-3819e11b483eSergey Myslyvyyhttp://social.msdn.microsoft.com/Profile/en-US/?user=Sergey%20MyslyvyyI can't pass parameter to [WebInvoke] methodHi,<br/> <br/> I need to call ADO.NET Data Services operation method that is marked with [WebInvoke] attribute.<br/> But I can't pass parameter to this method, it's always null on the server side.<br/> Parameter must be passed in the body of &quot;POST&quot; request, not in the url (it can be too large for query stirng, 10-50 kb for example).<br/> <br/> I tried to find some example on this forum and &quot;<span>ADO.NET Data Services</span> &quot; forum, but I found only advices to use query string (www.example.com/DataService.svc/method?param=value) or unanswered questions.<br/> <br/> Could somebody give some example?<br/> <br/> My code (not real, only for demonstration):<br/> <br/> <strong>Server side</strong> <br/> <br/> [WebInvoke]<br/> public void ValidateData(String data)<br/> {<br/>     // unfortunately, data is always null<br/> }<br/> <br/> <br/> <strong>Client code:</strong> <br/> <br/> String param = &quot;data='some data'&quot;;<br/> HttpWebRequest req = (HttpWebRequest)WebRequest.Create(&quot;http://localhost:4216/DataService.svc/ValidateData&quot;);<br/> req.Method = &quot;POST&quot;;<br/> req.ContentLength = param.Length;<br/> req.ContentType = &quot;application/xml&quot;;<br/> Stream sw = req.GetRequestStream();<br/> Byte[] bytes = Encoding.ASCII.GetBytes(param);<br/> sw.Write(bytes, 0, bytes.Length);<br/> WebResponse resp = req.GetResponse();<br/> <br/> <br/> Thanks,<br/> Sergey<br/>Fri, 18 Sep 2009 14:23:14 Z2009-09-28T18:50:36Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/947ef33b-ed00-49da-a511-3992027cda38http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/947ef33b-ed00-49da-a511-3992027cda38NoSuchhttp://social.msdn.microsoft.com/Profile/en-US/?user=NoSuchAre the 1.5 features expected to ship as part of .NET 4.0?The blog post alludes to 1.5 shipping with fx 4.0 but I wanted to double check - is that correct?  If that's true will we get a refresh with .NET 4 beta 2 at PDC?Tue, 01 Sep 2009 15:35:32 Z2009-09-28T18:36:21Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/17b8de6d-4571-4d25-a0cb-bc11cbf1133dhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/17b8de6d-4571-4d25-a0cb-bc11cbf1133dDave Russellhttp://social.msdn.microsoft.com/Profile/en-US/?user=Dave%20Russellv1.5 CTP (Not CTP2) and Count....Where or Where.....CountI'm developing with the original CTP1.5 release and I came across this today.  Is it fixed in CTP2 ?<br/> <br/> I want a query:<br/> <br/> http://mylocalservice/DataService/Service.svc/MyTable()/$count?$filter=IsPublished eq false<br/> <br/> So I started with....<br/> <br/>         Dim c = ctx.MyTable.Count( _<br/>                 Function(a As MyRec) (a.IsPublished = False))<br/> <br/> but I got a &quot;Not Supported&quot; error.<br/> <br/> However.....<br/> <br/>         Dim c = ctx.MyTable.Where(Function(a As MyRec) (a.IsPublished = False)).Count()<br/> <br/> works just fine.<br/> <br/> &quot;Select Count...Where&quot; seemed more logical to me than &quot;Select Where....Count&quot; - and Select Count Where is what appears in the url too.<br/>Thu, 24 Sep 2009 13:45:07 Z2009-09-28T18:34:02Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/a6e4875e-c643-4d69-b42f-2c3397ae2bd1http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/a6e4875e-c643-4d69-b42f-2c3397ae2bd1Nisar.Fideshttp://social.msdn.microsoft.com/Profile/en-US/?user=Nisar.FidesTransactional Replication WebServiceHey Sir,<br/> I want to perform Transactional replication using webservice. I have no idea which Api will used to achieve this, how can i ping the Publishers, how can i make subscriber by code, actually i performed all manually, but little confuse to perform with webservice, please guide me how can i achieve this. Mon, 28 Sep 2009 18:17:33 Z2009-09-28T18:17:33Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/5bdd87c1-d45e-456a-80ce-f4a2aae6aa3fhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/5bdd87c1-d45e-456a-80ce-f4a2aae6aa3fBIGDNFhttp://social.msdn.microsoft.com/Profile/en-US/?user=BIGDNFHow to handle complex (no CRUD) SP with RIA Services?<p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="" lang=EN-US><span style="font-size:small"><span style="font-family:Calibri">I would like to use .NET RIA Services to access my database from Silverlight but I have one problem – all post I have read are abut CRUD access to tables – using direct access to tables or SP and with support of Entity Framework or LinqToSql. Everything is nice but 90% of my solutions use SP to get a view of data with some joins (not one table like in most of the samples). When I try to use this kind of SP with LinqToSql this SP was not visible on client (Silverlight side) and no business object is generated – I only see tables mapped from database. I’m not good in Entity Framework but I can’t figure out how to use sp that return data from many tables – I have couple of problems (for instance all primary keys from source tables must be in entity, there is some concurrency with Entities when I try to use same source table for couple Entities and so on). My needs are very simple – I would like to generate SP proxy for SP that returns data from many tables and auto generate business object returned from this SP (precisely list of this objects) and as far as RIA Services are concern I would like to handle it form Silverlight with RIA Services – it is possible?</span></span></span></p>Wed, 23 Sep 2009 10:33:51 Z2009-09-23T10:33:52Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/be744702-9bcc-4fb4-805d-493ccf3e5ca2http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/be744702-9bcc-4fb4-805d-493ccf3e5ca2RinusRhttp://social.msdn.microsoft.com/Profile/en-US/?user=RinusRValidation <p>What is the best way for validation? Where to put it? On the serverside/clientside?<br/>How and where to write them?<br/><br/>Say I have a field UnitPrice and this price cannot be less then 0...<br/></p>Fri, 11 Sep 2009 13:28:00 Z2009-09-22T03:22:42Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/1423f4e1-4bd4-4765-b39e-2e6b556d062chttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/1423f4e1-4bd4-4765-b39e-2e6b556d062cJifhttp://social.msdn.microsoft.com/Profile/en-US/?user=JifCompression of bloated atom+xmlIs there any way to compress the DataServiceContext traffic to or from a server? <div><br/></div> <div>There seems to be half a solution, in applicationHost.config setting the:</div> <div> <div style="color:Black;background-color:White"> <pre><span style="color:Blue">&lt;</span><span style="color:#A31515">httpCompression</span> <span style="color:Red">directory</span><span style="color:Blue">=</span><span style="color:Black">&quot;</span><span style="color:Blue">%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files</span><span style="color:Black">&quot;</span><span style="color:Blue">&gt;</span> <span style="color:Blue">&lt;</span><span style="color:#A31515">dynamicTypes</span><span style="color:Blue">&gt;</span> ... <span style="color:Blue">&lt;</span><span style="color:#A31515">add</span> <span style="color:Red">mimeType</span><span style="color:Blue">=</span><span style="color:Black">&quot;</span><span style="color:Blue">*/*</span><span style="color:Black">&quot;</span> <span style="color:Red">enabled</span><span style="color:Blue">=</span><span style="color:Black">&quot;</span><span style="color:Blue">true</span><span style="color:Black">&quot;</span> <span style="color:Blue">/&gt;</span> <span style="color:Blue">&lt;/</span><span style="color:#A31515">dynamicTypes</span><span style="color:Blue">&gt;</span> <span style="color:Blue">&lt;/</span><span style="color:#A31515">httpCompression</span><span style="color:Blue">&gt;</span> </pre> </div> <div>And on the Context:</div> <div> <div style="color:Black;background-color:White"> <pre>wr.Headers.Add(<span style="color:#A31515">&quot;Accept-Encoding: gzip&quot;</span>); </pre> </div> </div> <div>Which is nice because it automatically compresses it when returned from the server.</div> <div><br/></div> <div>But then there's no way of getting the Client to decompress the result; it just falls flat on it's face.  Is there a way to:</div> <div>1. get the client to decompress the message;</div> <div>2. hook into the message before the client processes it;</div> <div><br/></div> </div> <div><br/></div> <div>Thanks</div> <div>Geoff</div> <div><br/></div>Tue, 25 Aug 2009 04:20:20 Z2009-09-11T09:27:10Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/1a4935a7-c6b4-4df5-a3a1-38143b3e0430http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/1a4935a7-c6b4-4df5-a3a1-38143b3e0430Jake Wardleyhttp://social.msdn.microsoft.com/Profile/en-US/?user=Jake%20Wardley The method 'Join' is not supported.When i use the join inside the dataservice client application , it will give the following error:<br/> <br/>  The method 'Join' is not supported.<br/> <br/> How should I solve this problem?<br/> <br/> Thanks.Thu, 03 Sep 2009 17:42:42 Z2009-09-14T14:07:43Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/279bca26-1503-45b4-82ab-fcf8fb2f5624http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/279bca26-1503-45b4-82ab-fcf8fb2f5624NoSuchhttp://social.msdn.microsoft.com/Profile/en-US/?user=NoSuchAzure Table StorageAre the necessary extensibility point there to have ADO.NET DS expose data from Azure's Table Storage?  I saw that some provider flexibility is available.  What's a good place to start?Tue, 01 Sep 2009 16:29:41 Z2009-09-01T16:29:43Zhttp://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/55200190-632a-440c-9e73-a2e02b28fb10http://social.msdn.microsoft.com/Forums/en-US/dataservices/thread/55200190-632a-440c-9e73-a2e02b28fb10Jake Wardleyhttp://social.msdn.microsoft.com/Profile/en-US/?user=Jake%20WardleyHow to make the entity property show up in the serverice reference?I have the following property ProductID inside the file of entity framework designer.cs , and I use data service against this entity framework, but when I add service reference in  another class library project inside the solution, the productId property did not show up in the reference.cs file, so I can not use it, I hope that one expert can help me how to populate this field to reference.cs so I can use it in that class library.<br/> <br/> <br/>  [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]<br/>         [global::System.Runtime.Serialization.DataMemberAttribute()]<br/>         public string ProductID<br/>         {<br/>             get<br/>             {<br/>                 return this._ProductID;<br/>             }<br/>             set<br/>             {<br/>                 this.OnProductIDChanging(value);<br/>                 this.ReportPropertyChanging(&quot;ProductID&quot;);<br/>                 this._ProductID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);<br/>                 this.ReportPropertyChanged(&quot;ProductID&quot;);<br/>                 this.OnProductIDChanged();<br/>             }<br/>         }<br/>         private string _ProductID;<br/>         partial void OnProductIDChanging(string value);<br/>         partial void OnProductIDChanged();<br/> <br/> <br/> Thanks.Fri, 28 Aug 2009 19:48:26 Z2009-08-28T19:48:26Z