Ejemplo n.º 1
0
        internal static IEntity ConstructEmptyEntity(int appId, ItemIdentifier header, ContentTypeRuntime typeRead)
        {
            var type = typeRead.Get(header.ContentTypeName);
            var ent  = EntityBuilder.EntityTemplate(appId, header.Guid, header.EntityId, 0, type);

            return(ent);
        }
Ejemplo n.º 2
0
 internal static List <IContentType> UsedTypes(List <BundleIEntity> list, ContentTypeRuntime typeRead)
 => list.Select(i
                // try to get the entity type, but if there is none (new), look it up according to the header
                => i.Entity?.Type
                ?? typeRead.Get(i.Header.ContentTypeName))
 .ToList();