public static SqliteDatabaseWindows ImportSchema( string filePath, bool createOrmAssembly, bool saveOrmAssembly, string ormAssemblyOutputDirectory) { SqliteDatabaseWindows result = (SqliteDatabaseWindows)GOCWindows.Instance.GetSerializer(SerializerType.JSON).DeserializeFromFile( typeof(SqliteDatabaseWindows), new Type[] { typeof(SqliteDatabaseTableWindows), typeof(SqliteDatabaseTableColumnWindows), typeof(DatabaseCacheWindows), typeof(DatabaseWindows), typeof(DatabaseTableWindows), typeof(DatabaseTableColumnWindows) }, filePath); if (createOrmAssembly) { result.CreateOrmAssembly(saveOrmAssembly, ormAssemblyOutputDirectory); } return(result); }
public static void ExportSchema(SqliteDatabaseWindows database, string filePath) { GOC.Instance.GetSerializer(SerializerType.JSON).SerializeToFile( database, new Type[] { typeof(SqliteDatabaseTableWindows), typeof(SqliteDatabaseTableColumnWindows), typeof(DatabaseCacheWindows), typeof(DatabaseWindows), typeof(DatabaseTableWindows), typeof(DatabaseTableColumnWindows), typeof(DatabaseTableForeignKeyColumnsWindows), typeof(DatabaseTableKeyColumnsWindows), typeof(ForeignKeyInfoWindows), typeof(DbmsWindows), typeof(SqliteTypeConverterWindows), typeof(SqliteTypeConversionInfoWindows) }, filePath); }