Last active
February 22, 2018 16:05
-
-
Save mczachurski/21d853352dddbfd4a7b3e594b6ca94bc to your computer and use it in GitHub Desktop.
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
private func registerDatabase(container: DependencyContainer) { | |
container.register(.singleton) { SQLiteConnection(configuration: $0) as SqlConnectionProtocol } | |
container.register { DatabaseContext(sqlConnection: $0) as DatabaseContextProtocol } | |
} | |
private func registerRepositories(container: DependencyContainer) { | |
container.register { TasksRepository(databaseContext: $0) as TasksRepositoryProtocol } | |
container.register { UsersRepository(databaseContext: $0) as UsersRepositoryProtocol } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment