Skip to content

Instantly share code, notes, and snippets.

@DanishAmjad12
Last active June 17, 2019 17:42
Show Gist options
  • Save DanishAmjad12/9988a705feb79615659062c2283dece9 to your computer and use it in GitHub Desktop.
Save DanishAmjad12/9988a705feb79615659062c2283dece9 to your computer and use it in GitHub Desktop.
package com.roomdatabase
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
@Dao
interface BookDAO
{
@Insert
fun saveBooks(book: BookEntity)
@Query(value = "Select * from BookEntity")
fun getAllBooks() : List<BookEntity>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment