开发者

WCF Data services or something else?

For a WPF client and Sql Server database application, I plan to use WCF data services for passing data between client and the开发者_Python百科 database but I find the WCF client too limited in its abilities. Complex LINQ queries with JOINS etc. cannot be sent over to the server.

Is there another techonology that I should use here which supports complex LINQ queries from client to the server?


It's not entirely correct that you can't join data using OData (a.k.a. WCF Data Services). It's just that LINQ to OData does not support join syntax. However you can still retrive results from intersection of multiple tables using either Expand method or simply by specifying a relationship in a select clause. For example, if you have a table User with relationship to Phone table, you can write "from u in ctx.User.Expand("Phone")...", or you can write "from u in ctx.User select new { u.Name, u.Phone }", and it will retrive Phone collection.

I am not aware of any other RESTful LINQ provider that would support querying SQL data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜