W
W
WingRS2016-12-18 10:47:14
C++ / C#
WingRS, 2016-12-18 10:47:14

Output fields of Entity Framework class?

I have a Player class, with the help of the controller I fill it, and so on. There is a team class, the question is how can I add a player to the team? You need to then be able to remove a player from the team, or modify the team.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MrDywar Pichugin, 2016-12-18
@WingRS

1) Read the EF tutorial .
2) Fluent API - setting and mapping properties and types .
This is done through the navigation property ICollection<Team>for the player, and ICollection<Player>for the team. EF will automatically create a player-team service table.
Before you do anything, read everything that is given in the links.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question