src/Misc/EFTools/EntityDesignModel/Commands/CreatePropertyCommand.cs
/// <summary>
///     Creates a property in the passed in entity of the default Type (non-nullable String).
///     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 commited.
/// </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 Property</returns>
Creates a property in the passed in entity of the default Type (non-nullable String).
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 commited.
Creates a property in the passed in entity of the default Type ( non - nullable String ) . 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 commited .
internal static Property CreateDefaultProperty(CommandProcessorContext cpc, string name, EntityType entityType)
        {
            var cpcd = new CreatePropertyCommand(
                name, entityType, ModelConstants.DefaultPropertyType, ModelConstants.DefaultPropertyNullability);
            cpcd._createWithDefaultName = true;
            var cp = new CommandProcessor(cpc, cpcd);
            cp.Invoke();
            return cpcd.CreatedProperty;
        }
internal static Property CreateDefaultProperty ( CommandProcessorContext cpc , string name , EntityType entityType ) { var cpcd = new CreatePropertyCommand ( name , entityType , ModelConstants . DefaultPropertyType , ModelConstants . DefaultPropertyNullability ) ; cpcd . _createWithDefaultName = true ; var cp = new CommandProcessor ( cpc , cpcd ) ; cp . Invoke ( ) ; return cpcd . CreatedProperty ; }
Creates a property in the passed in entity of the default Type (non-nullable String).
Creates a property in the passed in entity of the default Type ( non - nullable String ) .
The new Property
The new 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