Ejemplo n.º 1
0
 public GetCelestialByIdQueryHandler(ISqlDataRepository dataRepo, IMapper mapper)
 {
     _dataRepo = dataRepo;
     _mapper   = mapper;
 }
Ejemplo n.º 2
0
 public DeleteCelestialObjectCommandHandler(ISqlDataRepository dataRepo)
 {
     _dataRepo = dataRepo;
 }
 public AzureSearchProvider(ISearchConfiguration configuration, ISqlDataRepository sqlDataRepository)
 {
     _configuration     = configuration;
     _sqlDataRepository = sqlDataRepository;
 }
Ejemplo n.º 4
0
 public SearchCelestialQueryHandler(ISqlDataRepository dataRepo, IMapper mapper)
 {
     _dataRepo = dataRepo;
     _mapper   = mapper;
 }
 public DataController(ISqlDataRepository repos)
 {
     _repos = repos;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlContentRepository" /> class.
 /// </summary>
 /// <param name="dataRepo">The data repo.</param>
 /// <param name="connectionStringName">Name of the connection string.</param>
 /// <param name="tableName">Name of the table.</param>
 /// <param name="cachePath">The cache path.</param>
 /// <exception cref="System.ArgumentException">Connection does not exist.</exception>
 public SqlContentRepository(ISqlDataRepository dataRepo, string connectionStringName, string tableName, string cachePath)
 {
     this.Initialize(dataRepo, connectionStringName, tableName, cachePath);
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Initializes the specified data repo.
        /// </summary>
        /// <param name="dataRepo">The data repo.</param>
        /// <param name="connectionStringName">Name of the connection string.</param>
        /// <param name="tableName">Name of the table.</param>
        /// <param name="cachePath">The cache path.</param>
        /// <exception cref="System.ArgumentException">Connection does not exist:  + connectionStringName</exception>
        private void Initialize(ISqlDataRepository dataRepo, string connectionStringName, string tableName, string cachePath)
        {
            var cstring = ConfigurationManager.ConnectionStrings[connectionStringName];
            if (cstring == null)
            {
                throw new ArgumentException("Connection does not exist: " + connectionStringName);
            }

            this.ConnectionStringName = connectionStringName;
            this.TableName = illegalTableNameReplace.Replace(tableName ?? "CmsContent", string.Empty);
            this.CachePath = cachePath;
            this.DataRepository = dataRepo;

            if (!schemaExists)
            {
                schemaExists = true;
                this.EnsureSchema();
            }
        }