package com.bookbase.app.model.dao;

import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Query;

import com.bookbase.app.model.entity.Genre;

import java.util.List;

@Dao
public interface GenreDao {

    @Query("SELECT * FROM Genre")
    List<Genre> getGenres();

    @Query("SELECT * FROM Genre where genreId=:id")
    Genre getGenreById(int id);
}


@@ -72,16 +72,61 @@
 om.Dao;%0A
+import android.arch.persistence.room.Insert;%0A
 import a
@@ -412,12 +412,55 @@
 int id);
+%0A%0A    @Insert%0A    long insert(Genre genre);
 %0A%7D%0A%0A

Add insert method to GenreDao