Selecting multiple records from a table.

Trips

Well-known member
Joined
Aug 7, 2010
Messages
2,788
In a table with the name users there is a column called user_ID (PK). In annother table with the name user_logins, theres also a cloumn called user_ID. I started with LINQ some days ago, and managed to get associations between theese two tables in VS, but
when I select the record, there is only one record from the user_logins. If I select it I get the exception "Invalid operation exception: Sequence contains more than one element". I am aware that I get multiple elements from the table user_logins, but I get
only one instance to the record in the LINQ code.
Is there any way to get the elements out of the LINQ code, or do I have to write two different codes?

Thanks,
- Martin

View the full article
 
Back
Top