Ejemplo n.º 1
0
 public void DeleteAuthors(int authorID)
 {
     Entities.LibEntities dbCtx    = new Entities.LibEntities();
     Entities.author      bkUpdate = dbCtx.authors.First(b => b.AuthorID == authorID);
     dbCtx.authors.Remove(bkUpdate);
     dbCtx.SaveChanges();
 }
Ejemplo n.º 2
0
 public void InsertAuthors(Entities.author objAuth)
 {
     //NewsoftEntities dbCtx = new NewsoftEntities();
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.authors.Add(objAuth);
     dbCtx.SaveChanges();
 }