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); }
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();