Esempio n. 1
0
        public void GenerateAndDisplayCode(Table table)
        {
            SetCodeControlFormatting(applicationSettings);

            // Refresh the primary key relationships.
            table.PrimaryKey  = metadataReader.DeterminePrimaryKeys(table);
            table.ForeignKeys = metadataReader.DetermineForeignKeyReferences(table);

            // Show map and domain code preview
            ApplicationPreferences applicationPreferences = GetApplicationPreferences(table, false, applicationSettings);
            var applicationController = new ApplicationController(applicationPreferences, table);

            applicationController.Generate(writeToFile: false);
            mapCodeFastColoredTextBox.Text    = applicationController.GeneratedMapCode;
            domainCodeFastColoredTextBox.Text = applicationController.GeneratedDomainCode;
        }