Shopping cart promo code rules implementation
<p>An admin would create a promo code and choose from a list of predefined rules. The rules are constraints such as:</p>

<ul>
<li>Max uses</li>
<li>Expire date</li>
<li>Min cart subtotal</li>
<li>etc</li>
</ul>

<p>I could hard code these rules right into the code or I could (would like to) store the business logic in a database table and compile/execute it on the fly. Each business rule will be relatively simple and new ones could be created via the web admin. I imagine I could write some tests on creation of said rule to verify the code logic to some degree.</p>

<p><strong>Is storing the rule logic in a database a really bad idea?</strong> </p>

<p>I think it's silly to hard code all of these rules and recompile each time a new one is added.</p>

<p>Note: I read that <code>System.CodeDom</code> would do the compiling on the fly for me.</p>
