wcf-data-services

Cancel DataServiceCollection: Only a single enumeration is supported by this IEnumerable

天大地大妈咪最大 提交于 2021-02-11 18:11:49
问题 Reference to my previous question asked today in the following link I need help to write some code to cancel the changes on the client side without reloading the data. The only try I did was unsuccessfully as the following: private IEnumerable<TheEntity> _data; then: private void DoCancel() { _dataSource.Clear(true); _dataSource.Load(data); } I thought that I can clear the data and re-load a cached private field. Unfortunately, I get the error: Only a single enumeration is supported by this

Legal characters for properties on an open-type entity

限于喜欢 提交于 2021-02-08 08:56:19
问题 I have implemented a WCD Data Services / OData server, with an entity set as an open type. I am using custom IMetadataProvider, IQueryProvider, etc. I can create my entity, set open properties, retrieve them, update, and search -- mostly. The problem comes when I attempt to search for a property with something like a "dash" in the name This works: GET /Service/Cases?$filter=ABC eq 'ABC' This doesn't work: GET /Service/Cases?$filter=A-BC eq 'ABC' This also doesn't work: GET /Service/Cases?

Why doesn't my oData response have navigation properties

只谈情不闲聊 提交于 2020-01-22 15:41:25
问题 If you look at the following sample oData feed you'll see included navigation properties for 'child' items to tell you which URL to follow: http://services.odata.org/OData/OData.svc/Suppliers?$format=json For example supplier 0 has a navigation property to products. This links to a list of products for that supplier. http://services.odata.org/OData/OData.svc/Suppliers(0)/Products?$format=json I'm trying to do the same with ODataConventionModelBuilder and EntitySetController<Product> so that

401 Unauthorized with OData Update and Delete

我是研究僧i 提交于 2020-01-16 19:24:25
问题 For the first time I have stumbled upon a problem where the solution has not already been provided (completely) on SO, but I hope someone out there can help. My problem is similar to PUT and DELETE in RESTful WCF Service cause 401 Unauthorized error . That is, I have a WCF Data Service where I get a 401 whenever I try to do updates or deletes (read and post works without any problems). The difference to the abovementioned post is that I am not hosting my service in IIS but on Windows Azure,

C# - Design Problem Advice: Can't Use Dictionary then what?

邮差的信 提交于 2020-01-13 13:31:52
问题 I need to return a Dictionary (or some List, I just don't know) via a web service, specifically through a WCF Data Services. It looks like WCF Data Services does not support Dictionary types. Something to look like this via the web service: <?xml version="1.0" encoding="utf-8" standalone="yes" ?> - <Employees xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices"> <element>employee1, True</element> <element>employee2, False</element> <element>employee3, True</element> </Employees> I

C# - Design Problem Advice: Can't Use Dictionary then what?

牧云@^-^@ 提交于 2020-01-13 13:31:47
问题 I need to return a Dictionary (or some List, I just don't know) via a web service, specifically through a WCF Data Services. It looks like WCF Data Services does not support Dictionary types. Something to look like this via the web service: <?xml version="1.0" encoding="utf-8" standalone="yes" ?> - <Employees xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices"> <element>employee1, True</element> <element>employee2, False</element> <element>employee3, True</element> </Employees> I

ADO.Net Services service operation with parameters called from client library fails

こ雲淡風輕ζ 提交于 2020-01-13 06:42:08
问题 Console application var result = dataService.CreateQuery<Customers>("GetCustomerByLastName"). AddQueryOption("lastname", "S"); Service [WebGet] public IQueryable<Customers> GetCustomerByLastName( string lastname ) { return from c in this.CurrentDataSource.Customers where c.LastName.StartsWith( lastname ) select c ; } results in: (relative to http://localhost:1478/Apress.Data.Services.CustomerService.Host/) RequestUri: CustomerDataService.svc/GetCustomerByLastName()?lastname=S and fails as a

Problem rolling out ADO.Net Data Service application to IIS

纵然是瞬间 提交于 2020-01-11 19:51:52
问题 I am adding a ADO.Net Data Service lookup feature to an existing web page. Everything works great when running from visual studio, but when I roll it out to IIS, I get the following error: Request Error The server encountered an error processing the request. See server logs for more details. I get this even when trying to display the default page, i.e.: http://server/FFLookup.svc I have 3.5 SP1 installed on the server. What am I missing, and which "Server Logs" is it refering to? I can't find

is it possible to Query an Odata service and expand Child of Child entities?

核能气质少年 提交于 2020-01-09 12:52:02
问题 This sounds rather simple (and maybe I'm missing the obvious here) but I can't find a solution. I know I can query an entity and return one, or many direct child entities doing this: var query = from c in Service.Clients.Expand("Addresses,Comments,PhoneNumbers").. What I would like to be able to do is do the same with 3 levels (Children of child), lets say "Country->Province->City" or "Brand->Family->Model" I tried to expand all entities, but it fails var query = from c in Service.Brands

Dynamic query data from WCF Data Service to Silverlight Application?

為{幸葍}努か 提交于 2020-01-06 08:42:03
问题 I have a Silverlight application that contains a window that lists several values in multiple columns. The first column contains fields to be retrieved from a database, the second column contains table names. Multiple fields can be selected from the first column and only one field can be selected from the second column. So, the idea is to build a query that can select multiple columns from one of several tables (assume the column names are the same for each table). My question is how do I