private void Refresh() { _dataContext = new NepalHajjCommitteeConnectionString(); _dataContext.Configuration.AutoDetectChangesEnabled = false; _dataContext.Configuration.ValidateOnSaveEnabled = false; _roomRepository = new Repository <Room>(_dataContext); _bedRepository = new Repository <Bed>(_dataContext); _haajiGroupRepository = new Repository <HaajiGroup>(_dataContext); _batchRepository = new Repository <Batch>(_dataContext); _personRepository = new Repository <Person>(_dataContext); }
public NepalHajjCommitteeRepository() { _dataContext = _dataContext ?? (_dataContext = new NepalHajjCommitteeConnectionString()); _dataContext.Configuration.AutoDetectChangesEnabled = false; _dataContext.Configuration.ValidateOnSaveEnabled = false; }