This project has moved. For the latest updates, please go here.

Business and Authorization Rules made easier

Coordinator
Sep 28, 2011 at 10:52 PM

There are a couple new features you might have missed.

1) Validation

As you might now, some business and authorization rules have overloaded constructors. You must select the one that is active by changing its Constructor Is Active property to true. The overloaded constructors have different parameters and you must make sure to specify them all. In case your forget something,, on generate time CslaGenFork will check it for you and report the missing parameters.

2) Long namespaces

Rules have long namespaces like Csla.Rules.CommonRules.MaxLength unless you make it a lot shorter like MaxLength. Usualy shorter means increased readability. Now you can make business rules namespaces shorter both in CslaGenFork UI and in the generated code. How come?

Go to

01. Common Options
Namespaces

and click the ellipsis ("...") button. On the popup type a namespace per line. For the above example, you should type Csla.Rules.CommonRules without the final dot.

If you go back to your Business Rule Collection Editor or Authorization Type Editor and click on the Rule Type Name property, you will notice that the rule name gets shorter as the referred namespace is now omitted.

On generate time, CslaGenFork will add the referred namespace to using declarations.