Generating dynamic C# based on textual data into the runtime?
- by WeNeedAnswers
Is there a quick and easy way to load textual C# into a program.
I would like to load the LINQ from the database as an Expression and run it against some data (SQL or Array/List don't mind).
I know I can do it using the C# CodeDom/ExpressionTree builder with Assembly Loading and Creating AppDomains, but this seems very long winded.
Is there an easier way. I thought with the advent of .net 3.5 that the ExpressionTree would come to my aid, but I now realise that I have to write a parser to use this. Maybe there is a new trick in 4.0?
Something along the lines of a dynamic languages Parse would be great.
Any suggestions greatly appreciated.