Gets entity repository to be able to return a mix of object types

This commit is contained in:
Shannon
2019-11-05 15:05:51 +11:00
parent 412eadd9a3
commit 602acce8f4
19 changed files with 273 additions and 72 deletions

View File

@@ -226,11 +226,11 @@ namespace Umbraco.Web.Models.Mapping
{
switch (entity)
{
case ContentEntitySlim contentEntity:
// NOTE: this case covers both content and media entities
return contentEntity.ContentTypeIcon;
case MemberEntitySlim memberEntity:
case IMemberEntitySlim memberEntity:
return memberEntity.ContentTypeIcon.IfNullOrWhiteSpace(Constants.Icons.Member);
case IContentEntitySlim contentEntity:
// NOTE: this case covers both content and media entities
return contentEntity.ContentTypeIcon;
}
return null;