src/Misc/EFTools/EntityDesignModel/Commands/CreateComplexPropertyCommand.cs
/// <summary>
///     Creates a complex property in the passed in entity of the first ComplexType in the model ("Undefined" if there isn't one).
///     NOTE: If the cpc already has an active transaction, these changes will be in that transaction
///     and the caller of this helper method must commit it to see these changes committed.
/// </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>
/// <returns>The new Complex Property</returns>
Creates a complex property in the passed in entity of the first ComplexType in the model ("Undefined" if there isn't one).
NOTE: If the cpc already has an active transaction, these changes will be in that transaction
and the caller of this helper method must commit it to see these changes committed.
Creates a complex property in the passed in entity of the first ComplexType in the model ( " Undefined " if there isn ' t one ) . NOTE : If the cpc already has an active transaction these changes will be in that transaction and the caller of this helper method must commit it to see these changes committed .
internal static ComplexConceptualProperty CreateDefaultProperty(CommandProcessorContext cpc, string name, EntityType entityType)
        {
            var model = entityType.EntityModel as ConceptualEntityModel;
            ComplexType type = null;
            foreach (var complexType in model.ComplexTypes())
            {
                type = complexType;
                break;
            }
            var cpcd = new CreateComplexPropertyCommand(name, entityType, type);
            var cp = new CommandProcessor(cpc, cpcd);
            cp.Invoke();
            return cpcd.Property;
        }
internal static ComplexConceptualProperty CreateDefaultProperty ( CommandProcessorContext cpc , string name , EntityType entityType ) { var model = entityType . EntityModel as ConceptualEntityModel ; ComplexType type = null ; foreach ( var complexType in model . ComplexTypes ( ) ) { type = complexType ; break ; } var cpcd = new CreateComplexPropertyCommand ( name , entityType , type ) ; var cp = new CommandProcessor ( cpc , cpcd ) ; cp . Invoke ( ) ; return cpcd . Property ; }
Creates a complex property in the passed in entity of the first ComplexType in the model ("Undefined" if there isn't one).
Creates a complex property in the passed in entity of the first ComplexType in the model ( " Undefined " if there isn ' t one ) .
The new Complex Property
The new Complex Property
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