Exemplo n.º 1
0
 public static void ModifierSupport(support leSupport, int idSupport, string leTitreSupport, string leRealisateur, string imageSupport, int idGenre)
 {
     using (var context = new connexionBase())
     {
         int noOfRowUpdated = context.Database.ExecuteSqlCommand("UPDATE support set titreSupport=@leTitreSupport, realisateur=@leRealisateur, image=@imageSupport, idGenre=@idGenre WHERE idSupport=@idSupport", new SqlParameter("@idSupport", idSupport), new SqlParameter("@leTitreSupport", leTitreSupport), new SqlParameter("@leRealisateur", leRealisateur), new SqlParameter("@imageSupport", imageSupport), new SqlParameter("@idGenre", idGenre));
     }
 }
Exemplo n.º 2
0
 public static void AjouterSupport(int idSupport, string leTitreSupport, string leRealisateur, string imageSupport, int idGenre)
 {
     using (var context = new connexionBase())
     {
         int noOfRowUpdated = context.Database.ExecuteSqlCommand("INSERT INTO support (titreSupport, realisateur, image, idGenre) VALUES ('" + leTitreSupport + "', '" + leRealisateur + "', '" + imageSupport + ".jpg', '" + idGenre + "')");
     }
 }