I'm pretty sure the bug is on your end. I have no trouble retrieving metadata first at which point the database is created and seeded. Do it all the time.
You can see this for yourself in any of the Breeze Todo samples. Remember that your first Breeze client query always asks for metadata before processing your query so the first call to the server (in these samples) is always a request for metadata. These samples would not work if a request for metadata failed to generate the database.
The Todos sample initializes and seeds the database in a trivial way in the class ctor (the static ctor). Here's the entire TodosContext.cs
namespace Todo.Models {
using System.Data.Entity;
public class TodosContext : DbContext
{
// DEVELOPMENT ONLY: initialize the database
static TodosContext()
{
Database.SetInitializer(new TodoDatabaseInitializer());
}
public DbSet<TodoItem> Todos { get; set; }
}
}
To see it in action:
Show all files
Delete the *App_Data/todo.sdf* database
Set breakpoints on that constructor and on the methods of the Web API controller.
Run with debug (F5) ... you'll see the metadata endpoint hit first, then this static constructor.
Look at the *App_Data* folder in Windows Explorer and confirm that the database was created.
Continue ... you'll see the Todos query endpoint hit.
Continue ... the screen fills with seeded todos.
How are you doing it?