public CalendarEngine(IEventBroker broker) { m_Broker = broker; m_Broker.RegisterFor(EventType.LanguageChanged, this); _Positions = new ObservableCollection <PositionOfDay>(); try { m_notesDB = DBSingleton <RealNotesContext> .Instancja; var notes = m_notesDB.BrokerNotes.Count(); _isDataBaseOK = true; //DataBaseState = Properties.Resources.DataBaseStateOK; } catch (Exception e) { m_notesDB = DBSingleton <FakeNotesContext> .Instancja; _isDataBaseOK = false; //DataBaseState = Properties.Resources.DataBaseStateFails; } finally { if (_isDataBaseOK) { DataBaseState = Properties.Resources.DataBaseStateOK; } else { DataBaseState = Properties.Resources.DataBaseStateFails; } } DateTime dt_tmp = DateTime.Now; Selected_Date = new DateTime(dt_tmp.Year, dt_tmp.Month, dt_tmp.Day); }
public CalendarEngine(IEventBroker broker) { m_Broker = broker; m_Broker.RegisterFor(EventType.LanguageChanged, this); _Positions = new ObservableCollection<PositionOfDay>(); try { m_notesDB = DBSingleton<RealNotesContext>.Instancja; var notes = m_notesDB.BrokerNotes.Count(); _isDataBaseOK = true; //DataBaseState = Properties.Resources.DataBaseStateOK; } catch(Exception e) { m_notesDB = DBSingleton<FakeNotesContext>.Instancja; _isDataBaseOK = false; //DataBaseState = Properties.Resources.DataBaseStateFails; } finally { if (_isDataBaseOK) { DataBaseState = Properties.Resources.DataBaseStateOK; }else { DataBaseState = Properties.Resources.DataBaseStateFails; } } DateTime dt_tmp = DateTime.Now; Selected_Date = new DateTime(dt_tmp.Year, dt_tmp.Month, dt_tmp.Day); }
public NotesController(INotesContext notesContext) { this.notesContext = notesContext; }
public NotesRepository() { this._notesContext = new NotesContext(); }
public NotesRepository(INotesContext notesContext) { this._notesContext = notesContext; }
public NotesController(INotesContext dbContext) { _dbContext = dbContext; }
public NotesController() { context = new NotesTestContext(); }
public UnitOfWork(INotesContext context) { _context = context; }