Rebel.Cms.Web.TypedEntityExtensions.IsContent C# (CSharp) 메소드

IsContent() 공개 정적인 메소드

Determines whether the specified entity is content.
public static IsContent ( this entity, IReadonlyGroupUnit uow ) : bool
entity this The entity.
uow IReadonlyGroupUnit
리턴 bool
        public static bool IsContent(this TypedEntity entity, IReadonlyGroupUnit<IContentStore> uow)
        {
            var ancestorRelations = uow.Repositories.GetAncestorRelations(entity.Id, FixedRelationTypes.DefaultRelationType).ToArray();
            return ancestorRelations.Any(x => x.SourceId.Value == FixedHiveIds.ContentVirtualRoot.Value);
        }
TypedEntityExtensions