예제 #1
0
        private String ProcessShemaInfo()
        {
            ConfigModel.ConfigurationSystem OConfigurationSystem = new ConfigModel.ConfigurationSystem(ProjectDir);
            ConfigModel.Configuration       OConfiguration       = OConfigurationSystem.GetConfigurationFor(ProjectDir);
            String               ODatabaseFilePath = Path.Combine(ProjectDir, "Database.xdml");
            SchemaModel          OModel            = SchemaModel.Load(ODatabaseFilePath);
            ISchemalizerProvider OProvider         = new SqlProvider(OConfiguration.ConnectionString.Value);

            if (OModel == null || OProvider.HasSchemaChanged(OModel))
            {
                OModel = new SchemaModel();
                OProvider.ExtractMetadata(OModel, "Sqline");
                XElement OElement = OModel.ToXElement();
                OElement.Save(ODatabaseFilePath);
                FOutputFiles.Add(ODatabaseFilePath);
            }
            return(ODatabaseFilePath);
        }