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(); }
public void InsertAuthors(Entities.author objAuth) { //NewsoftEntities dbCtx = new NewsoftEntities(); Entities.LibEntities dbCtx = new Entities.LibEntities(); dbCtx.authors.Add(objAuth); dbCtx.SaveChanges(); }