Esempio n. 1
0
 public void update(int id, Auther new_auther)
 {
     //var auther = find(id);
     //auther.Name = new_auther.Name;
     db.Update(new_auther);
     db.SaveChanges();
 }
Esempio n. 2
0
 public void update(int id, Book newbook)
 {
     //// var book = books.SingleOrDefault(b => b.Idbook == id);  repeted in find method
     //var book = find(id);
     //book.Title = newbook.Title;
     //book.Description = newbook.Description;
     //book.Auther = newbook.Auther;
     //book.imageurl = newbook.imageurl;
     db.Update(newbook);
     db.SaveChanges();
 }