Created
June 15, 2017 05:37
-
-
Save SubhrajyotiSen/8729796773989f78f23bae437ca73dec 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
@Database(entities = {BorrowModel.class}, version = 1) | |
public abstract class AppDatabase extends RoomDatabase { | |
private static AppDatabase INSTANCE; | |
public static AppDatabase getDatabase(Context context) { | |
if (INSTANCE == null) { | |
INSTANCE = | |
Room.databaseBuilder(context.getApplicationContext(), AppDatabase.class, "borrow_db") | |
.build(); | |
} | |
return INSTANCE; | |
} | |
public abstract BorrowModelDao itemAndPersonModel(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment