Nowy artykuł na LinkedIn o fabrykach obiektów i współdzieleniu kodu


 Once we had a project where we had to execute an SQL query to an external source based fully on configuration, because it was not known at the time of design what kind of database it would be. The data source (type and connection string) was configurable and so was the query.

A simplified example of connection and query execution would look like this:

Very short, clear and easy, but only if database was MS SQL. What if we have two different database types ?

Całość artykułu tutaj