public override PropertyDefinition GetPropertyConvention() { var definition = new PropertyDefinition(); definition.Mandatory = Mandatory; definition.ValidationRegExp = string.IsNullOrEmpty(ValidationRegExp) ? ValidationRegExp : string.Empty; definition.PropertyGroup = string.IsNullOrEmpty(PropertyGroup) ? "Generic Properties" : PropertyGroup; definition.DataTypeDefinition = Conventions.GetDataTypeDefinitionByAttributeOrType(this, Type); return definition; }
public override PropertyDefinition GetPropertyConvention() { var definition = new PropertyDefinition(); definition.Mandatory = Mandatory; definition.ValidationRegExp = string.IsNullOrEmpty(ValidationRegExp) ? ValidationRegExp : string.Empty; definition.PropertyGroup = string.IsNullOrEmpty(PropertyGroup) ? "Generic Properties" : PropertyGroup; definition.DataTypeDefinition = Conventions.CreateDataTypeDefinitionFromAttribute(this, DataTypeName); if(string.IsNullOrEmpty(PreValue) == false) { //TODO - test inserting a prevalue when a DataTypeDefinition has been created, as its currently throwing a foreignkey constraint error. Conventions.CreatePrevalueForDataTypeDefinition(definition.DataTypeDefinition.Id, PreValue, 0, string.Empty); } return definition; }