title: EF 4.1 Code First Initialize my database
body: <p>I'am using EF code first to buil my project.
  I use seed method to initialize data in my database, but only some class model data have been register in the database.
  I dont have any warning or problem.
  for exemple: 
  1) Does not </p>
  
  <pre><code>var categories = new List&lt;Categorie&gt;{ 
                  new Categorie{Nom="Informatique"}, 
                  new Categorie{Nom="Bien Etre"}, 
   };
              categories.ForEach(s =&gt; context.Categories.Add(s));
              context.SaveChanges(); 
  </code></pre>
  
  <p>Class model: </p>
  
  <pre><code>public class Categorie 
      { 
          public int CategorieID { get; set; }
          public string Nom { get; set; }
          public virtual ICollection&lt;Cour&gt; Cours { get; set; }
      }
  </code></pre>
  
  <p>2) Done </p>
  
  <pre><code>var coachs = new List&lt;Coach&gt;
              { 
  new Coach{Nom="Guith",Prenom="Etienne", Login="etienneguith",Password="etienneguith",Profession="Neurologue",Cour="Medecine generale",Email="guithetienne@mic.be",agenda=temp1},
  new Coach{Nom="John",Prenom="Robert", Login="robertjohn",Password="robertjohn",Profession="Juge",Cour="Droit Penal",Email="robertjohn@mic.be",agenda=temp2}, 
   };
          categories.ForEach(s =&gt; context.Categories.Add(s));
          context.SaveChanges(); 
  </code></pre>
  
  <p>Class Model </p>
  
  <pre><code>public class Coach
      {
          public int CoachID { get; set; }
          public string Nom { get; set; }
          public string Prenom { get; set; }
          public string Login { get; set; }
          public string Password { get; set; }
          public string Profession { get; set; }
          public string Cour { get; set; }
          public string Email { get; set; }
          public DateTime agenda { get; set; }
  
  
          public virtual ICollection&lt;Session&gt; Sessions { get; set; }
  
      }
  </code></pre>