public static void CreerAssurance(Assurance assurance)
 {
     using (var contexte = new Contexte())
     {
         contexte.Assurances.Add(assurance);
         contexte.SaveChanges();
     }
 }
 public static void ModifierAssurance(Assurance assurance)
 {
     using (var contexte = new Contexte())
     {
         contexte.Assurances.Attach(assurance);
         contexte.Entry(assurance).State = EntityState.Modified;
         contexte.SaveChanges();
     }
 }
        public static void SupprimerAssurance()
        {
            Assurance assurance = ChoisirAssurance();

            using (var contexte = new Contexte())
            {
                contexte.Entry(assurance).State = EntityState.Deleted;
                contexte.SaveChanges();
            }
        }