public void add(Book entity) { //entity.Idbook = books.Max(b => b.Idbook) + 1;// to add new book add automatically id //books.Add(entity); db.books.Add(entity); db.SaveChanges(); }
public void add(Auther entity) { //entity.Id_auther = Authers.Max(b => b.Id_auther) + 1; //Authers.Add(entity); db.authers.Add(entity); db.SaveChanges(); }