Esempio n. 1
0
 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);
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        void CreateMappedAssemblyInfo(XPObjectSpace objectSpace, IPersistentAssemblyInfo persistentAssemblyInfo, LogonObject logonObject, string[] selectedTables)
        {
            var assemblyInfo = objectSpace.GetObject(persistentAssemblyInfo);

            new AssemblyGenerator(logonObject, assemblyInfo, selectedTables).Create();
            objectSpace.CommitChanges();
        }