I have a problem, the program launches but it crashes with an exception : Message=Invalid object name 'dbo.Entity1Set'. What happens ?
class Program
{
static void Main(string[] args)
{
Model1Container db = new Model1Container();
db.Database.CreateIfNotExists();
Personne ps = new Personne();
ps.Nom = "Loup";
ps.Prénom = "Julien";
db.PersonneSet.Add(ps);
db.GetValidationErrors();
db.SaveChanges(); //Exception ???
Console.ReadKey();
}
}
I don't know how and where to add "CreateDatabaseIfNotExists" in my code...