[I'm surprised that I didn't find an existing question with an answer to this conceptual question. Maybe I just didn't search the right keywords.]
Consider an entity type "Singer" with some of its own properties. Next, consider an entity type "Quartet" that has exactly four Singers in it, assigned to the roles "Tenor", "Lead", "Baritone", and "Bass" in the quartet.
The simplest way to model this code first is to just add four Singer navigation properties to the Quartet entity class, with the names of the four singer roles in that quartet. This would lead to a Quartet table and a Singers table with four rows with foreign keys referencing the quartet, and we have a one-to-four relationship. Not horrible, and this works, but it leads to some awkwardness in the program later.
There are numerous operations that would either need to be iterated over the four singers and done for each one, or conditional queries that need to operate on just one of the singers, depending on the value of some external enum that indicates which singer to act on.
Ideally, instead of having four separate Singer navigation properties, then, I'd like to have an array of Singers with a fixed size of four, where the elements of the array correspond directly to the enum values, and I could iterate over the array or go directly to a specific element based on the enum.
But this doesn't seem to model well in EF with SQL Server.
How can I accomplish what I need here?