示例#1
0
        public static SqlInstance CreateCustomDatabase(string DatabaseName)
        {
            SqlInstance instance = new SqlInstance();

            instance.CreateDatabase(DatabaseName);
            instance.SetDatabase(DatabaseName);
            DatabaseConfiguration dbConfig = DatabaseConfigurations.SqlPersistenceConfiguration(InstanceStoreVersion.Version45);

            instance.ExecuteSqlFile(dbConfig.CreateSchema);
            instance.ExecuteSqlFile(dbConfig.CreateLogic);
            return(instance);
        }