wcf-data-services

ADO.NET data services their place in overall design

怎甘沉沦 提交于 2019-12-12 10:01:18
问题 ADO.NET Data service is the next generation of data access layer within applications. I have seen a lot of examples using it directly from a UI layer such as Silverlight or Ajax to get data. This is almost as having a two tiered system, with business layer completely removed. Should DAL be accessed by the Business layer, and not directly from UI? 回答1: ADO.NET Data Services is one more tool to be evaluated in order to move data. .NET RIA Services is another one. Much better I would say. I see

Operation instead of query interceptor (WCF Data Services)

大憨熊 提交于 2019-12-12 09:42:20
问题 I was reading about query interceptors. I was disappointed because thats more like a filter instead of an interceptor. In other words you can eather include records or not include them. You are not able to modify records for instance. If I want to create a query interceptor for my entity Users I could then do something like: [QueryInterceptor("Users")] // apply to table users public Expression<Func<User, bool>> UsersOnRead() { return cust => cust.IsDeleted == false; } What if I instead create

Exception message is On data context type there is a top IQueryable property whose element type is not an entity type

我们两清 提交于 2019-12-12 09:41:38
问题 im bulding my WCFDataService hosted in IIS 7, im going to use Reflection Provider as data source provider. my sample work if i keep the entity type definition in the same assembly where i defined the service, but dosen't work if i move the entity type to another referenced assembly with following error "server encountered an error processing the request. The exception message is 'On data context type 'EntityContainer', there is a top IQueryable property 'Cats' whose element type is not an

Implement WCF Data Service using the Repository Pattern

六眼飞鱼酱① 提交于 2019-12-12 08:57:20
问题 We are using the repository pattern in our ASP.NET MVC 3 application. This means that, although we use EF 4.1 Code First to access the data in the backend, all MVC controllers do that via a generic repository class rather than directly over the DbContext subclass. Simplified code snippet: public class MyEntityContext : DbContext, IMyEntityContext { public IDbSet MyEntities { get; set; } ... } public class MyEntityRepository : IMyEntityRepository { private IMyEntityContext _context; public

how do you display xml data from wcf service in windows form app in datagridview or reportview? [closed]

坚强是说给别人听的谎言 提交于 2019-12-12 04:46:44
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I'm new to wcf and rest operations so any help would be great thank you. How do i display information in a rdlc or a datagridview? My Interface set up operation contract with a method called GetAllCustomer

WCF Data service $select returning 'Not Implemented' exception

99封情书 提交于 2019-12-12 04:35:42
问题 I have a project I am working on that has a Order entity that has a navigation property for OrderITems: public class Order { public int OrderId { get; set; } public int CustomerId { get; set; } public virtual ICollection<OrderItem> OrderItems { get; set; } } public class OrderItem { public int OrderId { get; set; } public int ProductId { get; set; } public int Quantity { get; set; } public virtual Order Order { get; set; } } If I query the OrderItems like so: http://mysvc.com/mysvc/OrderItems

Any good sample for an updatable WCF Data Service implementation

时间秒杀一切 提交于 2019-12-12 04:05:43
问题 I am looking for a good sample implementing an updatable WCF Data Service. I found this article on MSDN that shows a sample implementation using IUpdatable, but not sure if I understand this post. There are methods used in this post such as GetTable() and SubmitChanges(), whose implementation is not provided. Appreciate any pointers. 回答1: Found this one most useful - http://blogs.microsoft.co.il/blogs/gilf/archive/2008/08/31/how-to-perform-crud-operations-in-ado-net-data-services-with-custom

Querying WCF Services with OData Params in POST instead of GET

假如想象 提交于 2019-12-12 03:32:06
问题 We call wcf svcs (not ours) and we're using gets for searching a product database. Example: http://foo.com/SearchProducts.svc?$skip=0$take=10$includeTotalCount=true We were passing the Odata parameters to page the results of the SearchProducts svc. The svc has been changed to a POST because one of our filters "skus" is sometimes huge (hundres of skus) which causes the GET to break because the uri is too large. The easiest solution we thought was to just change the call to a post but now the

RestKit RKDynamicObjectMapping work only for first JSON result

痴心易碎 提交于 2019-12-12 03:08:24
问题 i got into an issue with RKDynamicObjectMapping , however it could be that i misuse it. I have the following scenario request to the service to get areas choose area request to the service to get journals for selected area data returned by both calls looks like that { d: [{cutID:""}, {cutID:""}, {cutID:""}] } { d: [{journalID:""}, {journalID:""}, {journalID:""}] } i have the following code RKObjectMapping* cutMapping = [RKObjectMapping mappingForClass:[Cut class]]; [cutMapping mapKeyPath:@

WCF Data Services Sessions

扶醉桌前 提交于 2019-12-12 03:07:57
问题 does WCF Data Services support sessions ? If so, Is there a good article explaining it ? 回答1: Yes. OData - WCF Data Services Best Practices from TechEd 回答2: Well, yes, you can effectively use the ASP.NET Session mechanisms. A very good article on that is this: http://blogs.msdn.com/b/wenlong/archive/2010/02/21/using-asp-net-sessions-from-wcf.aspx 来源: https://stackoverflow.com/questions/8363363/wcf-data-services-sessions