コード例 #1
0
        /// <summary>
        /// .ctor
        /// </summary>
        /// <param name="dataAccessFactory"></param>
        /// <param name="tableName"></param>
        /// <param name="configName"></param>
        public BaseDataRepository(IDataAccessFactory dataAccessFactory, string tableName, string configName)
        {
            _dataAccessFactory = dataAccessFactory;
            _tableName         = tableName;
            _configName        = configName;
            var dataProperty = DBSettings.GetDatabaseProperty(ConfigName);

            if (dataProperty != null)
            {
                _readDateType   = dataProperty.Reader.DatabaseType;
                _writerDataType = dataProperty.Writer.DatabaseType;
            }
        }
コード例 #2
0
        /// <summary>
        /// .ctor
        /// </summary>
        /// <param name="dataAccessFactory"></param>
        /// <param name="tableName"></param>
        /// <param name="configName"></param>
        public BaseDataRepository(IDataAccessFactory dataAccessFactory, string tableName, string configName)
        {
            _dataAccessFactory = dataAccessFactory;
            _tableName         = tableName;
            _configName        = configName;
            var tbNameAttr = GetTableName();

            if (!string.IsNullOrWhiteSpace(tbNameAttr))
            {
                _tableName = tbNameAttr;
            }
            var dataProperty = DBSettings.GetDatabaseProperty(ConfigName);

            if (dataProperty != null)
            {
                _readDateType   = dataProperty.Reader.DatabaseType;
                _writerDataType = dataProperty.Writer.DatabaseType;
            }
        }