コード例 #1
0
 private void SetupProperties(SQL.DataClasses.Table Table, IMapping Mapping)
 {
     Table.AddColumn(Mapping.IDProperty.FieldName,
         Mapping.IDProperty.Type.ToDbType(),
         Mapping.IDProperty.MaxLength,
         Mapping.IDProperty.NotNull,
         Mapping.IDProperty.AutoIncrement,
         Mapping.IDProperty.Index,
         true,
         Mapping.IDProperty.Unique,
         "",
         "",
         "");
     foreach (IProperty Property in Mapping.Properties)
     {
         if (!(Property is IManyToMany || Property is IManyToOne || Property is IMap || Property is IIEnumerableManyToOne || Property is IListManyToMany || Property is IListManyToOne))
         {
             Table.AddColumn(Property.FieldName,
             Property.Type.ToDbType(),
             Property.MaxLength,
             !Property.NotNull,
             Property.AutoIncrement,
             Property.Index,
             false,
             Property.Unique,
             "",
             "",
             "");
         }
     }
 }