src/Misc/EFTools/EntityDesignModel/Commands/CreateComplexPropertyCommand.cs
/// <summary>
///     The method will do the following:
///     - Creates a complex property with specified typeName in the entity-type.
///     - The complex property will be inserted in the specified position.
///     - Set the property's facet values.
/// </summary>
/// <param name="cpc"></param>
/// <param name="name">The name of the new property</param>
/// <param name="entityType">The entity to create this property in</param>
/// <param name="typeName">The complex property name.</param>
/// <param name="concurrencyMode">The property concurrencyMode facet value.</param>
/// <param name="getterAccessModifier">The property getterAccessModifier facet value.</param>
/// <param name="setterAccessModifier">The property setterAccessModifier facet value.</param>
/// <param name="insertPosition">Information where the property should be inserted to. If the parameter is null, the property will be placed as the last property of the entity.</param>
/// <returns></returns>
The method will do the following:
Creates a complex property with specified typeName in the entity-type.
The complex property will be inserted in the specified position.
Set the property's facet values.
The method will do the following : Creates a complex property with specified typeName in the entity - type . The complex property will be inserted in the specified position . Set the property ' s facet values .
internal static ComplexConceptualProperty CreateComplexProperty(
            CommandProcessorContext cpc, string name, EntityType entityType, string typeName,
            string concurrencyMode, string getterAccessModifier, string setterAccessModifier, InsertPropertyPosition insertPosition)
        {
            var cmd = new CreateComplexPropertyCommand(name, entityType, typeName, insertPosition);
            cmd.PostInvokeEvent += (o, eventsArgs) =>
                {
                    var complexProperty = cmd.Property;
                    Debug.Assert(complexProperty != null, "We didn't get good property out of the command");
                    if (complexProperty != null)
                    {
                        if (!String.IsNullOrEmpty(concurrencyMode))
                        {
                            complexProperty.ConcurrencyMode.Value = concurrencyMode;
                        }
                        if (!String.IsNullOrEmpty(getterAccessModifier))
                        {
                            complexProperty.Getter.Value = getterAccessModifier;
                        }
                        if (!String.IsNullOrEmpty(setterAccessModifier))
                        {
                            complexProperty.Setter.Value = setterAccessModifier;
                        }
                    }
                };
            var cp = new CommandProcessor(cpc, cmd);
            cp.Invoke();
            return cmd.Property;
        }
internal static ComplexConceptualProperty CreateComplexProperty ( CommandProcessorContext cpc , string name , EntityType entityType , string typeName , string concurrencyMode , string getterAccessModifier , string setterAccessModifier , InsertPropertyPosition insertPosition ) { var cmd = new CreateComplexPropertyCommand ( name , entityType , typeName , insertPosition ) ; cmd . PostInvokeEvent += ( o , eventsArgs ) => { var complexProperty = cmd . Property ; Debug . Assert ( complexProperty != null , " " ) ; if ( complexProperty != null ) { if ( ! String . IsNullOrEmpty ( concurrencyMode ) ) { complexProperty . ConcurrencyMode . Value = concurrencyMode ; } if ( ! String . IsNullOrEmpty ( getterAccessModifier ) ) { complexProperty . Getter . Value = getterAccessModifier ; } if ( ! String . IsNullOrEmpty ( setterAccessModifier ) ) { complexProperty . Setter . Value = setterAccessModifier ; } } } ; var cp = new CommandProcessor ( cpc , cmd ) ; cp . Invoke ( ) ; return cmd . Property ; }
The method will do the following:
 Creates a complex property with specified typeName in the entity-type.
The method will do the following : Creates a complex property with specified typeName in the entity - type .
// set ComplexProperty attributes
None
cpc
CommandProcessorContext
None
name
string
The name of the new property
The name of the new property
entityType
EntityType
The entity to create this property in
The entity to create this property in
typeName
string
The complex property name.
The complex property name .
concurrencyMode
string
The property concurrencyMode facet value.
The property concurrencyMode facet value .
getterAccessModifier
string
The property getterAccessModifier facet value.
The property getterAccessModifier facet value .
setterAccessModifier
string
The property setterAccessModifier facet value.
The property setterAccessModifier facet value .
insertPosition
InsertPropertyPosition
Information where the property should be inserted to. If the parameter is null, the property will be placed as the last property of the entity.
Information where the property should be inserted to . If the parameter is null the property will be placed as the last property of the entity .