DatabaseModule

@Module
class DatabaseModule

Database module for dependency injection. Provides instances of AppDatabase and DAOs.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
@Provides
@Singleton
fun provideAppDatabase(context: Context): AppDatabase

Provide an instance of AppDatabase. This method is annotated with @Provides to indicate that it should be used to create instances of AppDatabase.

Link copied to clipboard
@Provides
@Singleton
fun provideModelDAO(database: AppDatabase): ModelDao

Provide an instance of ModelDAO.

Link copied to clipboard

Provide an instance of OffloadingServiceDAO.