Any db connection with Factory Pattern, need clarification and review of my method
问题 I have this project where I try to implement a methodology so i can connect to any database. Following this site (and google), the best practice to achieve that is with a factory pattern (I've seen a few people referring to an abstract factory pattern but i never used it so i stayed with a factory pattern). So I've approached this problem with a factory pattern and created a interface for my Connection which looks like this: interface IConnection { string ConnectionString { get; set;}