Created
February 14, 2018 05:59
-
-
Save Sinarahimi/0f587036f16ef3b493b2130e8a77fc9b to your computer and use it in GitHub Desktop.
This file contains 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
public class MovieDatabaseHelper extends BaseDatabaseHelper { | |
private MovieDao movieDao; | |
public MovieDatabaseHelper(Context context) { | |
super(context); | |
movieDao = appDatabase.getMovieDao(); | |
} | |
public LiveData<List<Movie>> getAll() { | |
return movieDao.getAll(); | |
} | |
public void save(List<Movie> movies) { | |
movieDao.insert(movies); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment