I\'m trying to define a simple one-to-many relationship between two poco\'s, using the Entity Framework fluent API.
~ Team ~
public int TeamId {
I've been able to get this to work automatically simply by doing something like this:
public class Team {
public int TeamId { get; set; }
...
public virtual ICollection Players { get; set; }
}
But you'll have to be more specifical about what exactly you mean when you say "doesn't work". What doesn't work, exactly? Are you getting an error message? If so, what is it? Is the Team property of the Player object always returning null?