private async Task <List <TableModel> > GetTablesAsync(DatabaseInfo dbInfo, bool useEFCore5, SchemaInfo[] schemas) { if (dbInfo.DataConnection != null) { dbInfo.DataConnection.Open(); dbInfo.ConnectionString = DataProtection.DecryptString(dbInfo.DataConnection.EncryptedConnectionString); } var builder = new TableListBuilder(dbInfo.ConnectionString, dbInfo.DatabaseType, schemas); return(await System.Threading.Tasks.Task.Run(() => builder.GetTableDefinitions(useEFCore5))); }
private async Task <List <TableModel> > GetTablesAsync(DatabaseConnectionModel dbInfo, CodeGenerationMode codeGenerationMode, SchemaInfo[] schemas) { if (dbInfo.DataConnection != null) { dbInfo.DataConnection.Open(); dbInfo.ConnectionString = DataProtection.DecryptString(dbInfo.DataConnection.EncryptedConnectionString); } var builder = new TableListBuilder(dbInfo.ConnectionString, dbInfo.DatabaseType, schemas); return(await builder.GetTableDefinitionsAsync(codeGenerationMode)); }
private async Task <List <TableModel> > GetDacpacTablesAsync(string dacpacPath, bool useEFCore5) { TableListBuilder builder; if (dacpacPath.EndsWith(".edmx", StringComparison.OrdinalIgnoreCase)) { builder = new TableListBuilder(dacpacPath, DatabaseType.Edmx, null); } else { builder = new TableListBuilder(dacpacPath, DatabaseType.SQLServerDacpac, null); } return(await System.Threading.Tasks.Task.Run(() => builder.GetTableDefinitions(useEFCore5))); }
private async Task <List <TableModel> > GetDacpacTablesAsync(string dacpacPath, CodeGenerationMode codeGenerationMode) { TableListBuilder builder; if (dacpacPath.EndsWith(".edmx", StringComparison.OrdinalIgnoreCase)) { builder = new TableListBuilder(dacpacPath, DatabaseType.Edmx, null); } else { builder = new TableListBuilder(dacpacPath, DatabaseType.SQLServerDacpac, null); } return(await builder.GetTableDefinitionsAsync(codeGenerationMode)); }
private async Task <List <TableModel> > GetEdmxTablesAsync(string dacpacPath, bool useEFCore5) { var builder = new TableListBuilder(dacpacPath, DatabaseType.Edmx, null); return(await System.Threading.Tasks.Task.Run(() => builder.GetTableDefinitions(useEFCore5))); }
private async Task <List <TableModel> > GetDacpacTablesAsync(string dacpacPath, CodeGenerationMode codeGenerationMode) { var builder = new TableListBuilder(dacpacPath, DatabaseType.SQLServerDacpac, null); return(await builder.GetTableDefinitionsAsync(codeGenerationMode)); }