/// <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; } }
/// <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; } }