title: Using Room without ViewModel
body: <p>I just started using android room. Only problem is,
  It takes several layers for db interaction.
  Table Class -> Dao Interface -> Database Repo -> ViewModels</p>
  
  <p>And in each layer, code repetition is there.</p>
  
  <p>As if I directly call queries from Repo, without viewModels, it will not allow. Because call without viewModel observer becomes synchronous, which blocks main thread.</p>
  
  <p>Either there must be standard way to call repo asynchronously, or some hacks. 
  May be we can use some Async generic class, which lets you pass queries and return result to main thread.</p>
  
  <p>Possible hack. Don't knwo if it is correct way.</p>
  
  <pre><code>    AsyncTask.execute(new Runnable() {
          @Override
          public void run() {
              List&lt;User&gt; users = apiService.getAllUsers();
              if(users.size()&gt;0)
              {
                  System.out.println("Total users:"+users.size());
                  System.out.println("Email:"+users.get(0).getEmail());
              }
          }
      });
  </code></pre>