Entities
Entity definitions need to follow certain rules in order to work with Xams.
Entity Rules
- The Table name (specified with the Table attribute) and must match the name of the class.
- The Primary Key must be a Guid and take the shape of TableName + Id ie: WidgetId.
- Every entity must have either a string Name field or a string field with the attribute UIName.
- Composite Primary Keys are not allowed.
- See React Data Types for fields types that are compaitabile with the React components.
Project.Common / Entities / Widget.cs
Cascade Delete
If a relationship is defined as non-nullable, it becomes required and will be deleted if the related record is removed. To prevent cascade deletion, the relationship can be made nullable.
You can still make the field required by using the UIRequired attribute.