TCustomEntityModel.FileName Property

Specifies the path to the XML-mapping file.




property FileName: string;


Set the property value to specify a file in which the XML mapping is defined. The file specified in FileName is loaded automatically, and the meta-model defined in the file is created and registered in the meta model manager.

If the umDesignTime is specified in TEntityModelOptions.Usage, then the meta model becomes accessible at design-time, so properties such as TEntityConnection.DefaultModelName, TEntityContext.ModelName and TEntityTable.TypeName can be configured.

If the umRunTime is specified in TEntityModelOptions.Usage, then the meta model can be used at run-time. For mapping meta model to the entity classes, the special [XmlMapped] class attribute is used. See the A:xml-mapped-entities.htm article for details.

TEntityModel supports loading either of EntityDeveloper project files (*.enml) or generated XML-mapping files (*.xml). When the file specified is not a valid XML-mapping file, the exception is raised.

See Also

© 1997-2018 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback