Simple but good example on how to use Dapper with Structuremap and dependency injection
问题 I am trying to understand how to use Dependency Injection with Dapper (IDbConnection) and still being able to use built in dispose. I have found a couple of articles on the web but non that I think is easy to understand. What I am trying to figure out is how to make this simple class be testable: public class UserProfileRepository : IUserProfileRepository { private readonly IConfigRepository _configRepository; public UserProfileRepository(IConfigRepository configRepository) {