LINQ to SQL query in related tables

  • Thread starter Thread starter Dante Havenaar
  • Start date Start date
D

Dante Havenaar

Guest
Hi,

I have a library database with related tables. dbo.boeken (books) that only have the general data of a book.
PK is BoekID

There is a relationship with dbo.BoekenGegevens (Book data). These data for the book are the author, publisher and nur codes. An author and publisher have written and published several books.
FK is BoekID
(The other FK's belongs to Author / Publisher etc.)

The other table has the details of who owns the book.
FK is BoekID
A book can be owned by several libraries.

Now I want to do a search with a Linq query on the title of a book.
How do I build a LINQ query so that I only see the books that belong to the requesting library?

The Datasets:
Private dbBoeken As New BoekenDataContext
Private dbBoekenGemeenten As New BoekenGemeentenDataContext
Private dbBoekenGegevens As New BoekenGegevensDataContext

Kind regards,
Dante
1627901.png

Continue reading...
 
Back
Top