Ejemplo n.º 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();
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 3
0
 partial void UpdateAuthor(Author instance);
Ejemplo n.º 4
0
 partial void DeleteAuthor(Author instance);
Ejemplo n.º 5
0
 partial void InsertAuthor(Author instance);