public static void InsertOrUpdateAuthor(string first, string last) { BooksDataContext dc = new BooksDataContext(); Table<Author> authors = Accessor.GetAuthorsTable(); Author au = new Author(); au.FirstName = first; au.LastName = last; authors.InsertOnSubmit(au); authors.Context.SubmitChanges(); dc.SubmitChanges(); }
public static System.Collections.Generic.IEnumerable<linqdb.Title> getTitlesByAuthor(Author currentAuthor) { BooksDataContext dc = new BooksDataContext(); var titleByAuth = (from book in currentAuthor.AuthorISBNs select book.Title); return titleByAuth; }
partial void UpdateAuthor(Author instance);
partial void DeleteAuthor(Author instance);
partial void InsertAuthor(Author instance);