Created
November 19, 2019 05:51
-
-
Save markchristopherng/7ec8c4d16bfd8fbcdf416138bffbcb77 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
@Singleton | |
open class PayBillManager { | |
@Inject | |
lateinit var db: IPaybillDataProvider | |
open suspend fun save(bill: SavedBill?) { | |
if (bill != null) { | |
db.payBillDao().insert(bill) | |
} | |
} | |
open suspend fun delete(id: Int?) { | |
id ?: return | |
db.payBillDao().delete(id) | |
} | |
open suspend fun getAll(): List<SavedBill> = db.payBillDao().getAll() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment