public static void insertOrUpdateTitle(string isbn, string title, int edition, string copyright) { BooksDataContext dc = new BooksDataContext(); Table<Title> titles = Accessor.getTitlesTable(); Title t = new Title(); t.ISBN = isbn; t.BookTitle = title; t.EditionNumber = edition; t.Copyright = copyright; titles.InsertOnSubmit(t); titles.Context.SubmitChanges(); dc.SubmitChanges(); }
public static System.Collections.Generic.IEnumerable<linqdb.Author> getAuthorsByTitle(Title currentTitle) { BooksDataContext dc = new BooksDataContext(); var authByTitle = (from book in currentTitle.AuthorISBNs select book.Author); return authByTitle; }
partial void UpdateTitle(Title instance);
partial void DeleteTitle(Title instance);
partial void InsertTitle(Title instance);