public AssemblyGenerator(LogonObject logonObject, IPersistentAssemblyInfo persistentAssemblyInfo, string[] tables) { _persistentAssemblyInfo = persistentAssemblyInfo; var dataStoreSchemaExplorer = ((IDataStoreSchemaExplorer)XpoDefault.GetConnectionProvider(logonObject.ConnectionString, AutoCreateOption.None)); _storageTables = dataStoreSchemaExplorer.GetStorageTables(tables).Where(table => table.PrimaryKey != null).ToArray(); _logonObject = logonObject; _objectSpace = ObjectSpace.FindObjectSpaceByObject(persistentAssemblyInfo); }
public AssemblyGenerator(LogonObject logonObject, IPersistentAssemblyInfo persistentAssemblyInfo, string[] tables) { _persistentAssemblyInfo = persistentAssemblyInfo; var dataStoreSchemaExplorer = ((IDataStoreSchemaExplorer)XpoDefault.GetConnectionProvider(logonObject.ConnectionString, AutoCreateOption.None)); dataStoreSchemaExplorer = GetDataStoreSchemaExplorer(dataStoreSchemaExplorer); _storageTables = dataStoreSchemaExplorer.GetStorageTables(tables).Where(table => table.PrimaryKey != null).ToArray(); _logonObject = logonObject; _objectSpace = XPObjectSpace.FindObjectSpaceByObject(persistentAssemblyInfo); }
void CreateMappedAssemblyInfo(XPObjectSpace objectSpace, IPersistentAssemblyInfo persistentAssemblyInfo, LogonObject logonObject, string[] selectedTables) { var assemblyInfo = objectSpace.GetObject(persistentAssemblyInfo); new AssemblyGenerator(logonObject, assemblyInfo, selectedTables).Create(); objectSpace.CommitChanges(); }