Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CodeListRetrievalEngine" /> class.
        /// </summary>
        /// <param name="mappingStoreDb">The mapping store DB.</param>
        /// <param name="itemOrderBy">The item order by.</param>
        /// <exception cref="ArgumentNullException"><paramref name="mappingStoreDb" /> is null</exception>
        public CodeListRetrievalEngine(Database mappingStoreDb, string itemOrderBy = CodeListConstant.ItemOrderBy)
            : base(mappingStoreDb)
        {
            var itemSqlQueryBuilder = new ItemSqlQueryBuilder(mappingStoreDb, itemOrderBy);

            this._itemSqlQueryInfo = itemSqlQueryBuilder.Build(CodeListConstant.ItemTableInfo);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ItemSchemeRetrieverEngine{TMaintaible,TItem}"/> class.
        /// </summary>
        /// <param name="mappingStoreDb">
        /// The mapping store DB.
        /// </param>
        /// <param name="orderBy">
        /// The order By.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="mappingStoreDb"/> is null
        /// </exception>
        protected ItemSchemeRetrieverEngine(Database mappingStoreDb, string orderBy = null)
            : base(mappingStoreDb, orderBy)
        {
            this._itemCommandBuilder = new ItemCommandBuilder(mappingStoreDb);
            var       itemTableInfoBuilder = new ItemTableInfoBuilder();
            TableInfo tableInfo            = new TableInfoBuilder().Build(typeof(TMaintaible));
            var       itemTableInfo        = itemTableInfoBuilder.Build(tableInfo.StructureType);
            var       itemSqlQueryBuilder  = new ItemSqlQueryBuilder(mappingStoreDb, null);

            this._itemSqlQueryInfo = itemSqlQueryBuilder.Build(itemTableInfo);

            this._identifiableAnnotationRetrieverEngine = new IdentifiableAnnotationRetrieverEngine(mappingStoreDb, itemTableInfo);
        }