package Ġorg . ro bin . app . expense tracker . di Ċ Ċ import Ġandroid . content . Context Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . h ilt . Install In Ċ import Ġdagger . h ilt . android . qual ifiers . ApplicationContext Ċ import Ġdagger . h ilt . components . Singleton Component Ċ import Ġorg . ro bin . app . expense tracker . data . App Database Ċ import Ġorg . ro bin . app . expense tracker . data . Exchange Rate Dao Ċ import Ġorg . ro bin . app . expense tracker . data . Transaction Dao Ċ import Ġjavax . inject . Singleton Ċ Ċ /** Ċ Ġ* Ġprovider Ġmodule Ġto Ġcreate Ġdb Ġand Ġdao Ġinstances Ċ Ġ* Ġ@ author ĠRob in ĠSh i Ċ Ġ* Ġ@ since Ġ 5 / 0 8 / 2 1 Ċ Ġ*/ Ċ @ Module Ċ @ Install In ( Singleton Component :: class ) Ċ class ĠDatabase Module Ġ{ ĊĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide App Database (@ ApplicationContext Ġcontext : ĠContext ): ĠApp Database Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠApp Database . getInstance ( context ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide Transaction Dao ( app Database : ĠApp Database ): ĠTransaction Dao Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġapp Database . transaction Dao () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide Exchange Rate Dao ( app Database : ĠApp Database ): ĠExchange Rate Dao Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġapp Database . exchange Rate Dao () ĊĠĠĠ Ġ} Ċ }