title: Check if a table is empty with Entity Framework using CodeFirst
body: <p>I'm developing an application using MVVM where i want to use Entity Framwork 5.0. It's my first time using EF, so hope i can explain my problem so you all understand.
  My application has a embedded database and im using Code-First approach.</p>
  
  <p>Here is an example to illustrate the problem:
  Here i set my Project model which i set as a table in the embedded database, if i understand correct.</p>
  
  <pre><code>class CreateDbContext : DbContext
  {
      public CreateDbContext() : base() { }
  
      public CreateDbContext(String nameOrConnectionString) : base(nameOrConnectionString) { }
  
      public DbSet&lt;Project&gt; Projects { set; get; }
  }
  </code></pre>
  
  <p>Now in my ProjectViewModel i want to check if the Project table is empty in the database, before doing anything.</p>
  
  <pre><code>using (var db = new CreateDbContext())
  {
      if(db.Projects &lt;-- checked if this is Tablet is empty ??)
  }
  </code></pre>
  
  <p>How should i do that, or is it even possible?</p>