Draft
Conversation
* rename region names * add doc strings to DatabaseOptions * remove IDatabaseConnectionServiceFactory and DatabaseConnectionServiceFactory * add IOptions<DatabaseOptions> to DatabaseConnectionService * update unit tests
* create DbCommandFactory (because dbConnection.CreateCommand cannot be mocked without this additional abstraction) * implement first unit test as proof of concept (ExecuteQuery) * add DbProvider.Generic (WIP) * add some more documentation via doc strings
* implement CreateDbDataAdapter method for DbProvider.Generic (DbCommand) in DbDataAdapterFactory * remove backup project file that was added in error in the test project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO
docfx#2DbConnectionService<T>DbConnectionServiceFactory<T, U>MakefileAdvancedSystems.Security)IDbConnectionServiceIDbConnectionServiceFactoryDirectory.Build.Propsneeds any updatingreadme.mdUnit Tests (
DbConnectionService)TestExecuteQueryExecuteQueryAsyncTestExecuteNonQueryExecuteNonQueryAsyncTestAddDbConnectionService_FromOptionsTestAddDbConnectionService_FromAppSettingsUnit Tests (
DatabaseConnectionFactory)TestAddDbConnectionServiceFactory_FromOptionsTestAddDbConnectionServiceFactory_FromAppSettings<T>and<U>Notes
MsSqlServerConnectionServiceis tightly coupled to anSqlConnectioninstance. Refactor theDatabaseConnectionFactoryappropriately to make writing unit tests feasible.Use an in-memory message bus for configuring a specific provider, then renameMsSqlServerConnectionServicetoDatabaseConnectionServiceand listen to the broadcast.Idea: Send a signal fromDatabaseConnectionFactoryto request a connection service as singletonMsSqlServerExtensionstoDatabaseExtensions, and supply a more generic implementation ofCreateConnectionString. Think about how this would affect theMsSqlServerSettings... maybe rename it toMsSqlOptions?DbOptionsFactory(cf. WIP f4b111e)