This is a migrated thread and some comments may be shown as answers.

OpenAccess Query serialization

1 Answer 41 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Benjamin
Top achievements
Rank 1
Benjamin asked on 01 Feb 2013, 11:11 AM
Hello,

I am building an API using objects from an OpenAccessORM model.
My goal is to let API consumers to build their queries, serialize them to be able to them through a WCF call to a remote service.

I tried such solutions serializing classic LINQ syntax, but it looks like WCF serializer does not like LINQ objects...
Is there a simple way to achieve this using OpenAccessORM?

Cheers,
Ben

1 Answer, 1 is accepted

Sort by
0
Viktor Zhivkov
Telerik team
answered on 04 Feb 2013, 03:02 PM
Hello Bejamin,

OpenAccess uses the Expression Tree framework provided by Microsoft in .Net Framework. We are not providing the feature you are requesting. There are several open-source projects that aim to make .Net Expression Trees serializable. You can take a look at this discussion in StackOverflow.

I would like to propose a different approach for your scenario.
You can try OData-enabled services that support query LINQ-like queries that are expressed through the URL address of the request.

Your first choice can be Microsoft Data Services v5.0 (or after Q1 2013 release of OpenAccess you can use the latest version 5.2). There you will be able to use a client side mirror of your database context, query against it and have your queries executed on the server (and database server) side. This technology is mature and has wide adoption.

The other option that you can consider is Web API. The approach is similar to Data Services, but you are not restricted to using only entity types described in a context, but any type or method that you like.

Please let me know if you need more information or need any further assistance getting started with Data Services or Web API and OpenAccess.

Greetings,
Viktor Zhivkov
the Telerik team
Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
Tags
General Discussions
Asked by
Benjamin
Top achievements
Rank 1
Answers by
Viktor Zhivkov
Telerik team
Share this question
or