-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Every ContentTypeDescriptorViewModel has a PermittedContentTypes property that references other ContentTypeDescriptors that are permitted to be created under it. These are exclusively needed for the ContentTypeList view component, which only needs the Key and Title property. And, yet, currently, the entire ContentTypeDescriptorViewModel is mapped, including those derived from the underlying EditingTopicViewModel and CoreTopicViewModel (excluding associations). That's a lot of overhead for every request just to render a dropdown menu.
To mitigate this, establish a new PermittedContentTypeViewModel which only includes the Key and Title needed by the ContentTypeList view component. This can then be explicitly mapped on the ContentTypeDescriptorViewModel using 5.1.0's [MapAs()] attribute.