public void ExtendDatabaseStructure(
            IConceptInfo conceptInfo, ICodeBuilder codeBuilder,
            out IEnumerable <Tuple <IConceptInfo, IConceptInfo> > createdDependencies)
        {
            // Cascade delete FK in database is not essential because the server application will explicitly delete the referencing data (to ensure server-side validations and recomputations).
            // Cascade delete in database is just a convenience for development and testing.
            var info = (ReferenceCascadeDeleteInfo)conceptInfo;

            createdDependencies = null;

            if (ReferencePropertyConstraintDatabaseDefinition.IsSupported(info.Reference))
            {
                codeBuilder.InsertCode(Sql.Get("ReferenceCascadeDeleteDatabaseDefinition_ExtendForeignKey"),
                                       ReferencePropertyConstraintDatabaseDefinition.ForeignKeyConstraintOptions, info.Reference);
            }
        }
        public void ExtendDatabaseStructure(
            IConceptInfo conceptInfo, ICodeBuilder codeBuilder,
            out IEnumerable <Tuple <IConceptInfo, IConceptInfo> > createdDependencies)
        {
            // Cascade delete FK in database is not needed because the server application will explicitly delete the referencing data (to ensure server-side validations and recomputations).
            // Cascade delete in database is just a legacy feature, a convenience for development and testing.
            // It is turned off by default because if a record is deleted by cascade delete directly in the database, then the business logic implemented in application layer will not be executed.
            var info = (ReferenceCascadeDeleteInfo)conceptInfo;

            if (_legacyCascadeDeleteInDatabase.Value && ReferencePropertyConstraintDatabaseDefinition.IsSupported(info.Reference))
            {
                codeBuilder.InsertCode(Sql.Get("ReferenceCascadeDeleteDatabaseDefinition_ExtendForeignKey"),
                                       ReferencePropertyConstraintDatabaseDefinition.ForeignKeyConstraintOptions, info.Reference);
            }

            createdDependencies = null;
        }