Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    A football team is not a list of players. You have more than that Inventory, sites, employees ( Player : Employee ) and if that went to an api it would be a json ( or some data structure ) that has nothing to do with c#. And the list would probably be an ObservableCollection and not a list and using a where on a List type seems like bad practice Commented Apr 6, 2023 at 18:37
  • "You dont need to turn your FootballTeam into a list of FootballPlayers" <<< my original post. And people hide parts of objects from Json submission results all the time in .NET. That is why entity framework and others use navigation properties and other forms inside entity classes. I would not allow creation of a FootballTeam type without a player dependency of some form. Otherwise, its not a "team" object. Its something else...management or ownership maybe?
    – Stokely
    Commented Apr 6, 2023 at 21:33