public void CreateTableWithSubtypes(SchemaBuilder schemaBuilder)
{
// Creating a 'Building' table with the subtype field 'BuildingType'
FieldDescription buildingType = new FieldDescription("BuildingType", FieldType.Integer);
FieldDescription buildingName = new FieldDescription("Name", FieldType.String);
TableDescription tableDescription = new TableDescription("Building", new List<FieldDescription> { buildingName, buildingType });
// Add the building type subtype with three subtypes - Business, Marketing, Security
tableDescription.SubtypeFieldDescription = new SubtypeFieldDescription(buildingType.Name, new Dictionary<int, string> { { 1, "Business" }, { 2, "Marketing" }, { 3, "Security" } })
{
DefaultSubtypeCode = 3 // Assigning 'Security' building type as the default subtype
};
schemaBuilder.Create(tableDescription);
schemaBuilder.Build();
}