0

I have a data table, and each row contains a set of about 77 values, these values I need to run through about 1200 IF statements, but the IF statements (rules) may vary.

My original idea was to have a SQL table, with columns memberName, operator, target, trueValue, falseValue. Read the data from the table and in run time create expressions and run the data through that. And the idea worked well, the IF statements just seems to be more complicated than just "IF age > 30". Read more at: How can I calculate an expression parameter in run time?

So I thought, IF I can have an external file, that can be switched after the application has been installed, send the data table to the method(?) in the file and the file returns a single result value. That would also work perfect.

Can I do this with a .dll file maybe? Or something similar.

So to summarize, I want to run my data table values, through IF statements that I get from an external source because the IF statements might change from time to time.

Gillan
  • 149
  • 1
  • 4
  • 11
  • It would be awesome if you could provide a [mcve]. – mjwills May 17 '18 at 12:32
  • A DLL could work, but then you'd still need to be switching something out. In that case you might as well just change it in your code. A better alternative would be to build an API to handle the query and data, then that way at least you'll be able to change it without the application needing to update – Sasha May 17 '18 at 12:45
  • [This answer](https://stackoverflow.com/a/8860926/2557128) seems relevant. I don't think I can emphasize how dangerous this is. [This](https://learn.microsoft.com/en-us/dotnet/framework/add-ins/walkthrough-create-extensible-app) might be a safer way to go. – NetMage May 17 '18 at 23:21

0 Answers0