5

did someone tried this code library and have opinion about it? http://code.msdn.microsoft.com/exprserialization

10x

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Tamir
  • 3,833
  • 3
  • 32
  • 41
  • i released a similar project a couple of days agao: https://github.com/esskar/Serialize.Linq – esskar Sep 23 '12 at 14:51

5 Answers5

6

It looks like the project was abandoned but I did some work on it and now it works with .NET 4.0 and Silverlight. I made bug fixes to their code and also made it more DAL-independent.

http://expressiontree.codeplex.com/

T. Webster
  • 9,605
  • 6
  • 67
  • 94
  • I also just wrote a LINQ provider, which draws inspiration from the (seemingly inactive) IQToolkit project, for .NET 4.0. Reason was that I had to build my own LINQ-to-T-SQL provider for a project at work, enabling a ADO.NET 2.0 DAL for LINQ querying. http://linqprovider.codeplex.com/ – T. Webster Sep 30 '11 at 00:07
1

I have found that it cannot serialize custom closures and I am currently writing my own binary serializer. With that said the fact that expression tree serialization was not included in .net 4.0 is extremely dissapointing.

Steve Severance
  • 6,611
  • 1
  • 33
  • 44
1

I'm using this library to serialize/deserialize "linq to object" queries. The library doing this pretty well. There was some problems, but I was able to fix them due to the library's open source. The problem that it's not supported any more.

Kamarey
  • 10,832
  • 7
  • 57
  • 70
  • I guess this because of it refer to LINQ To SQL with DataContext instead of ObjectContext (in the implementation of the Entity Framework). Anyway, we solved this issue by creating dynamic query that the client side developer can create "Query" object, add "Condition" object to it's Query.Conditions collection etc' very similar to the way it's implemented in few other libraries (e.g. webdev) Thank you for sharing. Tamir. – Tamir Sep 23 '09 at 13:41
1

Security aspects of this library are really scary to me. It's almost like executing an arbitrary code that came from configuration or through a request.

Vlad Lifliand
  • 470
  • 2
  • 5
  • That's true, but with careful architecture of your system you won't come near any problems like that, and the benefits of Expression serialization are numerous, such as the ability to create custom predicate logic expressions and store them for later use, flexible GUI's, etc. – Jacobs Data Solutions Jul 05 '12 at 20:54
0

It's used in the client proxy for ADO.NET Data Services for performing LINQ queries against a RESTful service and having that query serialized and executed on the service. Works great in my experience.

If you want to test its usefulness, try out an ADO.NET Data Service.

Anderson Imes
  • 25,500
  • 4
  • 67
  • 82
  • i think we're not talking about the same thing. the expresion tree serialization project uses no WCF service. – Tamir Jun 04 '09 at 06:36
  • We are indeed talking about the same thing. This is an *application* of expression tree serialization - the serialized expression tree is used to create a URL for RESTful data retrieval. I thought you might like to see a practical application of expression tree serialization. (hopefully you aren't serializing expression trees just for the sake of serializing them :) ) – Anderson Imes Jun 04 '09 at 16:14
  • the samples MS provide for the ExpressionTreeSerialization project not showing any WCF service. they take IQueryable object, serialize it into new object, send to the server - no matter how (WS, WCF ect) and deserialize them back to IQueryable, execute the query and return the IEnumerable to the client. i think this is different thing from the Astoria project – Tamir Jun 08 '09 at 10:32
  • Well, you do need WCF service, but not RESTful, and this is for reflecting the entities from the service. Anyway, there is no connection between the ADO.NET Data Services(Astoria) and the ExpressionTreeSerialization. Finally, this library wasn't helpful for me as it's not supports EF, only LINQ2SQL. Thanks anyway! – Tamir Jun 18 '09 at 10:22