Available Output Settings

The following settings are available for the Entity Framework v1. There are two sections, one for the global defaults, which you can edit in the Project Settings Editor of the designer, and one which discusses the settings available per element, and which default setting sets their default value. This way you can easily track which default to set for which element setting.

Additionally the default attribute definitions per element is given.

Defaults

The following default settings and attributes are available, which control the default value for settings available per element.

Settings

These settings are edited using the Project Properties Editor, Output Setting Values tab.

EntityBaseClassNameDefault

This setting specifies the default value for the EntityBaseClassName setting of an entity. When using a non-POCO/non-IPOCO preset, be sure the class specified derives (in)directly from the generated CommonEntityBase class. Default value: CommonEntityBase

EmitKnownTypeAttributesForWCFDefault

This setting specifies the default value for the EmitKnownTypeAttributesForWCF setting of an entity. Default value: false

TypedListRowBaseClassNameDefault

This setting specifies the default value for the TypedListRowBaseClassName setting of a typed list. Default value: empty string

ValueTypeBaseClassNameDefault

This setting specifies the default value for the ValueTypeBaseClassName setting of a valuetype. When using a non-POCO/non-IPOCO preset, be sure the class specified derives (in)directly from the generated CommonValueTypeBase class. Default value: CommonValueTypeBase

Default attribute definitions

The following attribute definitions are defined by default for the Entity Framework v1. These attribute definitions are edited using the Project Settings Editor, Attributes node.

Serializable

Defined for element types: Entity Definition, Value Type Definition, Typed View Definition, Typed List Definition.

DataContract(IsReference$=$true)

Defined for element types: Entity Definition, Value Type Definition, Typed View Definition, Typed List Definition

DataMember

Defined for element types: Navigator Single Value, Navigator Collection, Normal field (entity, value type), Typed View field, Typed List Field.

Info

If you want to have a 'Field mapped onto a related field' to be serialized as well, add a DataMember attribute definition to the 'Field mapped onto related field' or add it globally for 'Field mapped onto a related field' in the Project Properties, Code gen. Meta-Data Defaults tab. Be aware that if you add it globally, the 'Field mapped onto a related field' can't be readonly, as a DataMember marked property has to have a setter and a read-only 'Field mapped onto a related field' doesn't have a setter.

Element Settings

The following settings are available per element. These settings are edited on the element's own editor (or the containing element's editor, in the case where the element itself doesn't have a separate editor) on the Code-gen info tab, or on the Project Settings Editor, if the element is the project.

Entity definition settings

EntityBaseClassName

The name of the base class for a generated entity class. The following macros are available: {$Name} for the entity name without group name, {$GroupName} for the name of the group the entity is in, {$FullName} for the group name plus entity name. Sub-types will always inherit from their super-type and not from the class specified. When using a non-POCO/non-IPOCO preset, be sure the class specified derives (in)directly from the generated CommonEntityBase class. Default value: the value of the default EntityBaseClassNameDefault.

EmitKnownTypeAttributesForWCF

This setting controls whether the code generator will add KnownType attributes to the generated entity classes for all types used in the class (true) or not (false, default). KnownTypeAttribute is used for WCF serialization and should be used in combination with Data Contracts. Default value: the value of the default EmitKnownTypeAttributesForWCFDefault

Field settings (value type definition field, entity definition field)

UseForOptimisticConcurrencyChecks

This setting controls whether the field is used in optimistic concurrency checks (true) or not (false, default). Default value: false

UseCascadeDeletes

This setting controls whether the related entity / entities over this navigator should be automatically deleted when this entity is deleted (true) or should be left alone (false, default). Ignored for navigators mapped onto M:N relationships and navigators which are on the FK side of the relationship. Default value: false

Project settings

PublicPropertyGettersAndSetters

This setting controls whether the generated entity, value type and typed list classes have public getters and setters for properties, like the properties for entity fields. If set to false, the properties will be generated as private for entity and typed view classes and internal for typed list classes. The context class will always have public properties. Default value: true

ProviderManifestTokenValue

This setting specifies the value which is emitted into the SSDL for 'ProviderManifestToken'. This value is necessary sometimes for some providers to be able to generate proper SQL. For example for SQL Server this is the version number, e.g. 2005, 2008 or 3.5 if you're targeting SQL CE Desktop. Default value: empty string

Typed List definition settings

TypedListRowBaseClassName

The name of the base class for a generated typed list row class. The following macros are available: {$Name} for the typed list name without group name, {$GroupName} for the name of the group the typed list is in, {$FullName} for the group name plus typed list name. Default value: the value of the default TypedListRowBaseClassNameDefault

Value type definition settings

ValueTypeBaseClassName

The name of the base class for a generated valuetype class. The following macros are available: {$Name} for the valuetype name without group name, {$GroupName} for the name of the group the valuetype is in, {$FullName} for the group name plus valuetype name. When using a non-POCO/non-IPOCO preset, be sure the class specified derives (in)directly from the generated CommonValueTypeBase class. Default value: the value of the default ValueTypeBaseClassNameDefault