public async Task <SqlTableViewModel> CreateSqlTableViewModel(SqlTable table)
        {
            var sqlTableViewModel = new SqlTableViewModel(_importWizardViewModel)
            {
                TableName  = table.TableName,
                SchemaName = table.SchemaName,
                Columns    = table.Columns
            };
            await sqlTableViewModel.Initialize();

            return(sqlTableViewModel);
        }
Пример #2
0
 public TableImportArgumentsViewModel(SqlTableViewModel table)
 {
     _table              = table;
     TableName           = table.TableName;
     SingularName        = table.SingularName;
     BaseRepositoryTypes = new List <Type>
     {
         typeof(ICRUDRepository <,>),
         typeof(IReadOnlyRepository <,>),
         typeof(IIndexedRepository <,>),
         typeof(IRepository),
     };
     SelectedBaseRepositoryType = BaseRepositoryTypes[0];
     Columns = AsyncObservableCollection <ColumnImportArgumentsViewModel> .Create(_table.Columns.Select(CreateColumn));
 }
Пример #3
0
        private TableImportArgumentsViewModel CreateImportArgs(SqlTableViewModel sqlTableViewModel)
        {
            var importArgs = new TableImportArgumentsViewModel(sqlTableViewModel);

            return(importArgs);
        }