Your business rules belong with the Entity classes.
Most of the business rules are defined using
DataAnnotation attributes
that annotate the property and class definitions of the
Entity Metadata class.
For example:
using DESDA=PeterBlum.DES.DataAnnotations;
...
[DESDA.DisplayName("Categories")]
public class Category
{
[DESDA.Required()]
[DESDA.DisplayName("Name")]
public object CategoryName { get; set; }
[DESDA.DataType(DataType.MultilineText)]
[DESDA.RequiredDependency("CategoryName")]
public object Description { get; set; }
}
DataAnnotation attributes have fixed values for the life of the application. You can also
add business rules to the Entity class that you defined in the Business Logic Layer that
allow setting values based on the situation.
The tours below cover the DataAnnotation attributes. Some are defined in the .net framework.
BLD enhances many and introduces more, to cover a wide variety of business rules.
The tours will also explore how to create rules that are determined in code, instead of in attributes.
When Phase 2 is complete, the BLD-based web application has changed based soley on the
changes made to the Business Logic Layer.