コード例 #1
0
 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();
 }
コード例 #2
0
        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;
        }
コード例 #3
0
 partial void UpdateAuthor(Author instance);
コード例 #4
0
 partial void DeleteAuthor(Author instance);
コード例 #5
0
 partial void InsertAuthor(Author instance);