/// <summary>
 /// Danner basisklasser for et repository, der benytter DBAX.
 /// </summary>
 /// <param name="configuration">Konfiguration for DBAX.</param>
 protected DbAxRepositoryBase(IDbAxConfiguration configuration)
 {
     if (configuration == null)
     {
         throw new ArgumentNullException("configuration");
     }
     Configuration = configuration;
 }
        /// <summary>
        /// Default konstruktør.
        /// </summary>
        public DataAccessService()
        {
            try
            {
                InitializeComponent();

                IContainer container = ContainerFactory.Create();
                _logRepository          = container.Resolve <ILogRepository>();
                _dbAxConfiguration      = container.Resolve <IDbAxConfiguration>();
                _dbAxRepositoryCachers  = new List <IDbAxRepositoryCacher>(container.ResolveAll <IDbAxRepositoryCacher>());
                _dbAxRepositoryWatchers = new List <FileSystemWatcher>();
            }
            catch (ComponentActivatorException ex)
            {
                Exception rootException = ex.GetBaseException();
                _logRepository.WriteToLog($"{MethodBase.GetCurrentMethod().Name}: {rootException.Message}", EventLogEntryType.Error, int.Parse(Properties.Resources.EventLogOnConstructionExceptionId));
                throw rootException;
            }
            catch (Exception ex)
            {
                _logRepository.WriteToLog($"{MethodBase.GetCurrentMethod().Name}: {ex.Message}", EventLogEntryType.Error, int.Parse(Properties.Resources.EventLogOnConstructionExceptionId));
                throw;
            }
        }
 /// <summary>
 /// Danner repository for fælles elementer.
 /// </summary>
 /// <param name="dbAxConfiguration">Konfiguration for DBAX.</param>
 public FællesRepository(IDbAxConfiguration dbAxConfiguration)
     : base(dbAxConfiguration)
 {
 }