static void supp() { Console.WriteLine("Suppression de Harley"); HarleyProvider provider = new HarleyProvider(); foreach (EntityHarley harley in provider.GetAllHarleys()) { if (harley.Id > 4) { provider.Delete(harley); } } Console.WriteLine("Supression réussie"); }
static void Delete() { Console.WriteLine("==== Effacement de la couleur ===="); HarleyProvider provider = new HarleyProvider(); foreach (EntityHarley harley in provider.GetAllHarleys()) { if (harley.Couleur == "Verte") { harley.Couleur = "Verte"; provider.Delete(harley); } } }