コード例 #1
0
 public void guardarLenguaje(lenguaje lenguaje)
 {
     using (var context = new dbEntities())
     {
         context.lenguajes.Add(lenguaje);
         context.SaveChanges();
     }
 }
コード例 #2
0
 public void borrarLenguaje(int id)
 {
     using (dbEntities context = new dbEntities())
     {
         lenguaje leng = context.lenguajes.First(l => l.lenguaje_id == id);
         context.lenguajes.Remove(leng);
         context.SaveChanges();
     }
 }