public DbTest() { // Configuration = new ConfigurationBuilder() // .SetBasePath(Directory.GetCurrentDirectory()) // .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) // .Build(); DB = new DbMgr(new DbContext(DBConnection)); }
public OraDBSettingReadWriter(IDbMgr DBMgr, ILogMgr logMgr) { _DBMgr = DBMgr; _logMgr = logMgr; _logger = _logMgr.GetLogger("DBSettingReadWriter"); CreateDBCommands(); _settingsList = new List <SettingData>(); }
private void InitCoreService() { IDbConnection dbConnection = new OraConnection(); CompositionContainer.ComposeExportedValue <IDbConnection>(dbConnection); _dbMgr = new OraDBMgr(dbConnection, LogMgr); CompositionContainer.ComposeExportedValue <IDbMgr>(_dbMgr); _settingMgr = new SettingMgr(LogMgr); _settingMgr.ReadWriteProvider = new OraDBSettingReadWriter(_dbMgr, LogMgr); CompositionContainer.ComposeExportedValue <ISettingMgr>(_settingMgr); _regionMgr = new RegionMgr(LogMgr); CompositionContainer.ComposeExportedValue <IRegionMgr>(_regionMgr); int firstMenuIndex = 2; BarCommandRegion mainMenuRegion = new BarCommandRegion(RegionName.MainMenu, _mainForm.MainMenu, firstMenuIndex); _regionMgr.AddCommandRegion(RegionName.MainMenu, new MainMenuCommandRegionDecorator(RegionName.MainMenu, mainMenuRegion)); _regionMgr.AddCommandRegion(RegionName.PlugginMenuItem, new SubMenuCommandRegionDecorator(RegionName.PlugginMenuItem, mainMenuRegion, _mainForm.PlugginBarButtonItem)); int firstToolBarIndex = 2; BarCommandRegion toolBarRegion = new BarCommandRegion(RegionName.MainToolBar, _mainForm.MainToolBar, firstToolBarIndex); _regionMgr.AddCommandRegion(RegionName.MainToolBar, toolBarRegion); IViewRegion documentRegion = new DocumentViewRegion(RegionName.DocumentRegion, _mainForm.MainDocumentManager, _mainForm.MainDockManager, LogMgr); _regionMgr.AddViewRegion(RegionName.DocumentRegion, documentRegion); IViewRegion dockPanelRegion = new DockingViewRegion(RegionName.DockPanelRegion, _mainForm.MainDocumentManager, _mainForm.MainDockManager, LogMgr); _regionMgr.AddViewRegion(RegionName.DockPanelRegion, dockPanelRegion); IViewFormMgr viewFormMgr = new ViewFormMgr(_mainForm, _mainForm.MainTaskBar, LogMgr); CompositionContainer.ComposeExportedValue <IViewFormMgr>(viewFormMgr); IMessageBoxMgr messageBoxMgr = new MessageBoxMgr(_mainForm, LogMgr, null, typeof(MainWaitForm)); CompositionContainer.ComposeExportedValue <IMessageBoxMgr>(messageBoxMgr); _plugginMgr = ServiceMgr.Current.GetInstance <IPlugginMgr>(); _eventMgr = ServiceMgr.Current.GetInstance <IEventMgr>(); }
public IndexModel(IDbMgr db) { DB = db; }
public DbTransaction(IDbMgr dbManager) { _DBManager = dbManager; Success = false; _DBManager.StartTransaction(); }
public HomeController(IServiceProvider serviceProvider, IDbMgr db) { ServiceProvider = serviceProvider; DB = db; }