Example #1
0
        public string RemoveDatabaseStructure(IConceptInfo conceptInfo)
        {
            var info = (ReferencePropertyInfo)conceptInfo;

            if (info.DataStructure is EntityInfo)
            {
                return(PropertyDatabaseDefinition.RemoveColumn(info, info.GetColumnName()));
            }
            return("");
        }
        public string RemoveDatabaseStructure(IConceptInfo conceptInfo)
        {
            var info = (DatePropertyInfo)conceptInfo;

            if (info.DataStructure is EntityInfo)
            {
                return(PropertyDatabaseDefinition.RemoveColumn(info, SqlUtility.Identifier(info.Name)));
            }
            return("");
        }
        public string CreateDatabaseStructure(IConceptInfo conceptInfo)
        {
            var info = (LongStringPropertyInfo)conceptInfo;

            if (info.DataStructure is EntityInfo)
            {
                return(PropertyDatabaseDefinition.AddColumn(_conceptMetadata, info));
            }

            return("");
        }
        public string CreateDatabaseStructure(IConceptInfo conceptInfo)
        {
            var info = (DatePropertyInfo)conceptInfo;

            PropertyDatabaseDefinition.RegisterColumnMetadata(_conceptMetadata, info, SqlUtility.Identifier(info.Name), Sql.Get("DatePropertyDatabaseDefinition_DataType"));
            if (info.DataStructure is EntityInfo)
            {
                return(PropertyDatabaseDefinition.AddColumn(_conceptMetadata, info));
            }

            return("");
        }
        public string CreateDatabaseStructure(IConceptInfo conceptInfo)
        {
            var info = (ReferencePropertyInfo)conceptInfo;

            PropertyDatabaseDefinition.RegisterColumnMetadata(_conceptMetadata, info, info.GetColumnName(), Sql.Get("ReferencePropertyDatabaseDefinition_DataType"));
            if (IsSupported(info))
            {
                return(PropertyDatabaseDefinition.AddColumn(_conceptMetadata, info));
            }

            return("");
        }
Example #6
0
        public string CreateDatabaseStructure(IConceptInfo conceptInfo)
        {
            var info = (MoneyPropertyInfo)conceptInfo;

            SqlUtility.Identifier(info.Name);

            if (info.DataStructure is EntityInfo)
            {
                return(PropertyDatabaseDefinition.AddColumn(_conceptMetadata, info,
                                                            Sql.Format("MoneyPropertyDatabaseDefinition_CreateCheckConstraint", ConstraintName(info), SqlUtility.Identifier(info.Name))));
            }
            return("");
        }
        public string RemoveDatabaseStructure(IConceptInfo conceptInfo)
        {
            var info = (MoneyPropertyInfo)conceptInfo;

            if (info.DataStructure is EntityInfo)
            {
                return
                    (Sql.Format("MoneyPropertyDatabaseDefinition_RemoveCheckConstraint",
                                SqlUtility.Identifier(info.DataStructure.Module.Name),
                                SqlUtility.Identifier(info.DataStructure.Name),
                                ConstraintName(info))
                     + Environment.NewLine
                     + PropertyDatabaseDefinition.RemoveColumn(info, SqlUtility.Identifier(info.Name)));
            }
            return("");
        }