Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivalent for VFP's Evaluate Command
Message
From
01/06/2009 14:56:02
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
01/06/2009 11:56:24
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01402679
Message ID:
01403039
Views:
59
>Cetin,
>I have looked at that, but I fail to see how that solves the problem. Either the documentation is bad or I am mentally slow (probably the latter). How would I use this to evaluate an expression held in a table. For example, suppose that record number 500 in the table had a text field that held the expression :
>
>(table1.field1+ table2.field13) * table1.field3
>
>How could I get the evaluation of this expression? It appears to be that dynamic linq just allows you to dynamically create linq statements.
>
>Thanks for your help!


Open the program.cs in the sample I pointed to and then try entering an expression like:
  string strWhere = "OrderID == @0";
  int id = 10248;
  string strSelect = "New(Quantity,UnitPrice, Quantity*UnitPrice as extended)"; 
  
  var dynamicQuery = db.Order_Details.Where(strWhere, id).Select(strSelect);
Those strings might be your strings in record 500.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform