public static string GetColumnType(this DomainObjectProperty property, DatabaseType dbType) { if (string.IsNullOrEmpty(property.ColumnType)) { return(DbTypeConversion.NetTypeToSqlType(property.PropertyType.ToString(), dbType, property.Length)); } else { return(property.ColumnType); } }
public static string GetColumnName(this DomainObjectProperty property) { return(string.IsNullOrEmpty(property.ColumnName) ? property.PropertyName.ToLower() : property.ColumnName); }
public static bool RequiresValidation(this DomainObjectProperty property) { return(!property.IsNullable || property.Length > 0); }