wcf-data-services

How can I get OData DELETE to work?

十年热恋 提交于 2019-11-30 23:01:06
问题 I've created an OData service (WCF Data Service), and a consumer to test it. Previously, when I attempted to delete, I got the WebDAV 405 error message, "Method Not Allowed". So I googled and found: http://nikhilthaker86.wordpress.com/2010/03/27/issue-hosting-restful-services-on-iis-7/ I followed the instructions and removed the WebDav module from my website (service) in IIS 7. Now I get this error message instead: "HTTP Error 500.21 - Internal Server Error Handler "WebDAV" has a bad module

WCF, Web services or ADO.NET data services: What shall I use?

天涯浪子 提交于 2019-11-30 20:32:29
For a project I have to implement a communication between a database hosted on a web server and several clients out there in the internet. After reading a bit and watching a few introductory videos about possible (Microsoft) technologies I figured out that I seem to have (at least) three options: 1) Windows Communication Foundation (WCF) 2) ASP.NET Web services 3) ADO.NET Data services Because I am not familiar with any of those three technologies I have to learn (hopefully only) one of them in depth - and the question is: Which one? Or to be more precise: Which one for the following task?

Collection Exists Criteria in WCF Data Services

偶尔善良 提交于 2019-11-30 08:44:16
问题 I'm trying to ask my OData service: "Give me all the Products that do not have a Category" with the Products and Category have a m2m relationship. I've tried: from p in Products where p.Categories == null select p and from p in Products where !p.Categories.Any() select p and from p in Products where p.Categories.Count == 0 select p but all of these give me not supported exceptions. I'm not looking for alternatives or options. Please don't answer with other options. 回答1: My experience with WCF

Upgraded to EF 6 (RTM) - Getting System.Data.Entity.Core.Objects.ObjectContext cannot be used for return type System.Data.Objects

…衆ロ難τιáo~ 提交于 2019-11-30 07:13:10
Just upgraded a .NET 4.5 WCF Service, which also has an OData service to use EF 6. The OData service was of course working prior to the upgrade. Now, when attempting to query the OData service or even just browse to it from Visual Studio 2012, I get the following Request Error : The server encountered an error processing the request. The exception message is 'Expression of type 'System.Data.Entity.Core.Objects.ObjectContext' cannot be used for return type 'System.Data.Objects.ObjectContext''. See server logs for more details. The exception stack trace is: at System.Linq.Expressions.Expression

WCF Data Service 5.6 quick start

本小妞迷上赌 提交于 2019-11-30 04:17:14
问题 I have been trying to get a WCF Data Service server working for a few days now. I finally backed off today and just tried to do exactly what the quick-start shows.. nothing else.. and in completely fresh project. Surely that would work. But it didn't.. it failed the same way as my other tests. I am just following along with this example. Using Visual Studio 2013 for Web express and the hosting is using IIS Express. I have installed the WCF Tools version 5.6 such that Visual Studio has the WFC

How to Improve WCF Data Services Performance

只愿长相守 提交于 2019-11-29 23:31:53
I'm new to WCF Data Services so I've been playing. After some initial tests I am disappointed by the performance of my test data service. I realize that because a WCF DS is HTTP-based there is overhead inherent in the protocol but my tests are still way slower than I would expect: Environment: All on one box: Quad core 64-bit laptop with 4GB RAM running W7. Decent machine. Small SQL database (SQLExpress 2008 R2) with 16 tables... the table under test has 243 rows. Hosted my test service in IIS with all defaults. Code: I've created a Entity Framework model (DataContext) for this database (stock

Where to set a UTC datetime value in n-tier application: Presentation Layer, Domain, or Database?

 ̄綄美尐妖づ 提交于 2019-11-29 11:46:19
This seems like it should be an obvious question, but I have had some issues finding a good answer. I am building an n-tier application that needs to be UTC time sensitive. Values can be updated and when they are timestamps are recorded. This includes transactions in the database where updates or inserts will impact datetime columns. To give some context I am using SQL 2008 R2 + with DATETIMEOFFSET(2) for most of my datetime columns. I am considering putting the updates for timestamps into the Stored Procedures so that they do not need to be passed through the network. This will save bandwidth

Select entities where ID in int array - WCF Data Services, LINQ

主宰稳场 提交于 2019-11-29 10:55:09
I would like to return a set of entities who has and ID that is contained in a list or array of IDs using LINQ and Data Services. I know how to this using LinqToEF but I am at a loss how to this with Data Services or using OData query conventions for that matter. My thought is that I would do something like: int[] intArray = {321456, 321355, 218994, 189232}; var query = (from data in context.Entity where intArray.contains(data.ID) select data); Is there any way to accomplish using Data Services / OData? I know I could probably hack it with a Service Operation but I would prefer not to do that.

Upgraded to EF 6 (RTM) - Getting System.Data.Entity.Core.Objects.ObjectContext cannot be used for return type System.Data.Objects

落爺英雄遲暮 提交于 2019-11-29 09:03:14
问题 Just upgraded a .NET 4.5 WCF Service, which also has an OData service to use EF 6. The OData service was of course working prior to the upgrade. Now, when attempting to query the OData service or even just browse to it from Visual Studio 2012, I get the following Request Error : The server encountered an error processing the request. The exception message is 'Expression of type 'System.Data.Entity.Core.Objects.ObjectContext' cannot be used for return type 'System.Data.Objects.ObjectContext''.

Collection Exists Criteria in WCF Data Services

佐手、 提交于 2019-11-29 07:20:16
I'm trying to ask my OData service: "Give me all the Products that do not have a Category" with the Products and Category have a m2m relationship. I've tried: from p in Products where p.Categories == null select p and from p in Products where !p.Categories.Any() select p and from p in Products where p.Categories.Count == 0 select p but all of these give me not supported exceptions. I'm not looking for alternatives or options. Please don't answer with other options. My experience with WCF Data Services is that the client subset of LINQ to rest is lacking. My biased option would be to just move