Exemple #1
0
 public static AUTOR get_autor_by_name(string name)
 {
     using (BTESTEntities1 context = new BTESTEntities1())
     {
         AUTOR obiectAutor = context.AUTOR.FirstOrDefault(a => a.Nume == name);
         return(obiectAutor);
     }
 }
Exemple #2
0
 //schimbare asocieri
 public static void schimba_autor(CARTE c, AUTOR a)
 {
     c.AUTOR   = a;
     c.AutorId = a.AutorId;
     context2.SaveChanges();
 }
Exemple #3
0
 public static void adauga_autor(AUTOR a)
 {
     context2.AUTOR.Add(a);
     context2.SaveChanges();
 }