I have the following 3 classes in my dbml file:
public class Player {
public int PlayerID {get; set;}
public string Name {get; set;}
}
public class PlayerItem {
public int PlayerItemID {get; set;}
public int PlayerID {get; set;}
public int ItemID {get; set;}
}
There is an association created between Player.ID and PlayerItem.PlayerID
Public Class CustomItem {
public int ItemID {get; set;}
public string ItemName {get; set;}
}
Here's the setup:
- I have a list of Players - List
<Player>
- Each player has a Entityset child of type PlayerItem
- I have a list of Items - List
<Item>
How can I select only those players that have at least one custom item in their list of PlayerItems? This is basically matching ItemID in each Player's PlayerItems with the Item ID in CustomItem.
Ultimately, I'd like to have a simple list of players - List<Player>
- to work with.