Click or drag to resize
MappableFieldWrapperIsOptional Property
Gets a value indicating whether the mappable field is optional in the entity its defined in. If the wrapped field is a field in a value type, the field's IsOptional is returned, as that's the value dictating if the field is optional in the entity the instance is defined in. This was previously different (the valuetyped field dictated the nullability of its contained fields, from the perspective of the entity) but this gives problems with nested valuetypes which contain nullable fields but are themselves not nullable. It's a non-solvable problem however, so we went with the situation with the least friction. The problem is not solvable because the situation entity.ValueTypedField.OptionalValueTypedField.NormalNonOptionalField, has NormalNonOptionalField as not optional, however because it's containing object, OptionalValueTypedField is optional (supported in e.g. NHibernate, not in EF), the field onto which NormalNonOptionalField is mapped on has to be nullable in the database as it can contain no value, from the perspective of the entity.

Namespace:  SD.LLBLGen.Pro.ApplicationCore.Mapping
Assembly:  SD.LLBLGen.Pro.ApplicationCore (in SD.LLBLGen.Pro.ApplicationCore.dll) Version: 5.1.0.0 (5.1.0)
Syntax
public bool IsOptional { get; }

Property Value

Type: Boolean
See Also