Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Business Rules Expression
Message
From
04/08/2015 01:45:12
Walter Meester
HoogkarspelNetherlands
 
 
To
03/08/2015 18:01:46
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01622904
Message ID:
01622906
Views:
42
Hi Ron,

I cannot help you on the .NET specifics, but the strategy I've used in our VFP application could be used in .NET as well. We have an Expression validation class and each individual rule is a subclass of that. We store the rules into a chain of responsibility (but you could do this in a collections as well) at run time. A validation method on the CA (But could be Biz or data object as well) will be called for each rule in the chain (or collection).

We do compile the rules at runtime which in VFP is easier to do than in .NET, but if you do not need to add ad-hoc business/validation rules, compiling them beforehand might work for you.

We have moved away from using EVALuating rules because it is slower than compiled rules. The difference was significant enough to go for compiles rules.

Walter,




>Hello Everyone.
>
>I have all my syntax expressions in a sql table. I was wanting to write a method in NET that would get those expressions from SQL Table and evaluate the expressions via True or False. For example, BusinessObject.Field > 1 is an example of the expression in the table. i what to check the expression and store the result value of true or false.
>
>Do any have any code snippet that i can use. I am trying to create a generic method that would traverse through expressions in a sql table and evaluate them.
Previous
Reply
Map
View

Click here to load this message in the networking platform