21 Haziran 2011 Salı 15:24
What's the difference between the entity FlattenedFile and the entity File? and How are they related during the process of adding files (say images) to a user-defined Zentity resource (using the Zentity's generated dll, csdl,..., as showed in the "Data Model Extensibility User Guide ", not the Sevices provided by Zentity as in the USPresidentSample)?
22 Haziran 2011 Çarşamba 13:18
Thank you for your post.
File is an entity type that is used in the Hierarchical Model of Zentity. This model is used by Zentity API and WCF Services like Publishing Service, Search Service etc.
FlattenedFile is also an entity type that is used in the Flattened Model of Zentity. This model is used only by Zentity Data Services (implemented using WCF Data Services). It is a known issue in WCF Data Services that shipped with .Net 4.0 that doesn’t support an Entity Model that is Hierarchical in nature. e.g – In case of Zentity, the base of all entity types is “Resource” and all entity types are derived from this base type.
In order to make the current Entity Model with WCF data services, the Zentity team has come up with the Flattened Model, which defined each entity type as a standalone type and does not inherit from any base class like the Hierarchical model.
To add files using the Zentity Data Service you have to create an instance of FlattenedFile entity class and populate the respective fields.
To add files using the Zentity Core API (Zentity.Core.dll) then you will need to create an instance of File and populate the respective fields.-Regards