Exemple #1
0
 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);
     }
 }
Exemple #2
0
 public static string GetColumnName(this DomainObjectProperty property)
 {
     return(string.IsNullOrEmpty(property.ColumnName) ?
            property.PropertyName.ToLower() :
            property.ColumnName);
 }
Exemple #3
0
 public static bool RequiresValidation(this DomainObjectProperty property)
 {
     return(!property.IsNullable || property.Length > 0);
 }