When you view the BLD application in Phase 1, it lists all of the Entity classes and
many DataFields. The BLD user interface gathers these lists from the business logic using
Automatic Scaffolding. Without doing anything, you will get DataFields in the order
they appear in the Entity class. It will only skip certain DataFields based on their type and a
few other characteristics.
Use the DESDA.ScaffoldColumnAttribute to override
these rules. It determines if the DataField is shown, based on the data entry mode, and its order.
(Data entry modes are read-only, edit, and insert.)
Use the ScaffoldTableAttribute (notice it doesn't use "DESDA.") to exclude
Entity classes that you do not want in a list of available Entities.
Here are DESDA.ScaffoldColumnAttributes associated with the Order Entity class
and the ScaffoldTableAttribute which hides the Order_Details Entity class.
public class OrderMetadata
{
[DESDA.ScaffoldColumn(ScaffoldEdit = false, ScaffoldInsert = false)]
public object CustomerID { get; set; }
[DESDA.ScaffoldColumn(Position = 0)]
public object Customer { get; set; }
}
[ScaffoldTable(false)]
public class Order_DetailMetadata
{
}
The Source Code Browser shows completed DataAnnotations. The DESDA.ScaffoldColumnAttributes
and ScaffoldTableAttributes have
been highlighted.
In the next topic, you'll learn how to
restrict access to Entities and specific DataFields based on the user's role.
Open the Source Code Browser (C# only)