src/Shared/EntityFramework/Core/Mapping/ViewGeneration/Structures/MemberProjectedSlot.cs
// <summary>
// Given the <paramref name="prefix" />, determines the slots in <paramref name="slots" /> that correspond to the entity key for the entity set or the
// association set end. Returns the list of slots.  Returns null if even one of the key slots is not present in slots.
// </summary>
// <param name="prefix"> corresponds to an entity set or an association end </param>
Given the , determines the slots in  that correspond to the entity key for the entity set or the
association set end. Returns the list of slots.  Returns null if even one of the key slots is not present in slots.
Given the determines the slots in that correspond to the entity key for the entity set or the association set end . Returns the list of slots . Returns null if even one of the key slots is not present in slots .
internal static List<MemberProjectedSlot> GetKeySlots(IEnumerable<MemberProjectedSlot> slots, MemberPath prefix)
        {
            var entitySet = prefix.EntitySet;
            Debug.Assert(entitySet != null, "Prefix must have associated entity set");
            var keys = ExtentKey.GetKeysForEntityType(prefix, entitySet.ElementType);
            Debug.Assert(keys.Count > 0, "No keys for entity?");
            Debug.Assert(keys.Count == 1, "Currently, we only support primary keys");
            var keySlots = GetSlots(slots, keys[0].KeyFields);
            return keySlots;
        }
internal static List < MemberProjectedSlot > GetKeySlots ( IEnumerable < MemberProjectedSlot > slots , MemberPath prefix ) { var entitySet = prefix . EntitySet ; Debug . Assert ( entitySet != null , " " ) ; var keys = ExtentKey . GetKeysForEntityType ( prefix , entitySet . ElementType ) ; Debug . Assert ( keys . Count > 0 , " " ) ; Debug . Assert ( keys . Count == 1 , " " ) ; var keySlots = GetSlots ( slots , keys [ 0 ] . KeyFields ) ; return keySlots ; }
Given the , determines the slots in  that correspond to the entity key for the entity set or the
association set end.
Given the determines the slots in that correspond to the entity key for the entity set or the association set end .
// Get the entity type of the hosted end or entity set // Get the slots for the key
slots
IEnumerable<MemberProjectedSlot>
prefix
MemberPath
corresponds to an entity set or an association end
corresponds to an entity set or an association end