Jump to content
Xtreme .Net Talk

LINQ to SQL query in related tables


Recommended Posts

Guest Dante Havenaar
Posted

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

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...