Home > .NET Domain Model, Developing Using CodeFluent Entities, Presentation > Rules in CodeFluent Entities (Video)

Rules in CodeFluent Entities (Video)

Following the same idea as exposed in the Methods post, CodeFluent Entities allows developers to specify rules in their models. Different types of rules are available to us:

  • Event rules: triggered upon a lifecycle event of a CodeFluent Entities concept (entity creation, save, delete, read record, property set, etc.),
  • Validation rules to validate data inputs,
  • Transaction rules: lets you wrap a method in a transaction,
  • Implementation rules: specify that an entity implements a particular interface for instance,
  • Authorization rules: define permissions in your object model,
  • Custom rules: implement your own custom rules.

Here are two videos illustrating different types of rules.

The first one illustrates how to add a Validation rule on a property:

How to define Validation rules

The second one shows how to add an Event rule and how they can be used to extend the generated code by adding your own custom logic:

How to extend the generated code using event rules
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s