Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Module
class DataBaseModule {
@Provides
@Singleton
fun provideRoom(app: Application): AppDatabase = Room
.databaseBuilder(app, AppDatabase::class.java, BuildConfig.APPLICATION_ID)
.build()
@Provides
@Singleton
fun provideHotelsDao(room: AppDatabase): HotelsDao = room.hotelsDao()
@Provides
@Singleton
fun provideVisitorsDao(room: AppDatabase): VisitorsDao = room.visitorsDao()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.