AnsiChar | System.Char | DbType.AnsiStringFixedLength - 1 char | |
Boolean | System.Boolean | DbType.Boolean | Default when no type attribute specified. |
Byte | System.Byte | DbType.Byte | Default when no type attribute specified. |
Char | System.Char | DbType.StringFixedLength - 1 char | Default when no type attribute specified. |
DateTime | System.DateTime | DbType.DateTime - ignores the milliseconds | Default when no type attribute specified. |
LocalDateTime | System.DateTime | DbType.DateTime - ignores the milliseconds | Ensures the DateTimeKind is set to DateTimeKind.Local |
UtcDateTime | System.DateTime | DbType.DateTime - ignores the milliseconds | Ensures the DateTimeKind is set to DateTimeKind.Utc |
Decimal | System.Decimal | DbType.Decimal | Default when no type attribute specified. |
Double | System.Double | DbType.Double | Default when no type attribute specified. |
Guid | System.Guid | DbType.Guid | Default when no type attribute specified. |
Int16 | System.Int16 | DbType.Int16 | Default when no type attribute specified. |
Int32 | System.Int32 | DbType.Int32 | Default when no type attribute specified. |
Int64 | System.Int64 | DbType.Int64 | Default when no type attribute specified. |
PersistentEnum | A System.Enum | The DbType for the underlying value. | Do not specify type="PersistentEnum" in the mapping. Instead specify the Assembly Qualified Name of the Enum or let NHibernate use Reflection to "guess" the Type. The UnderlyingType of the Enum is used to determine the correct DbType . |
Single | System.Single | DbType.Single | Default when no type attribute specified. |
Ticks | System.DateTime | DbType.Int64 | type="Ticks" must be specified. |
TimeSpan | System.TimeSpan | DbType.Int64 | Default when no type attribute specified. |
Timestamp | System.DateTime | DbType.DateTime - as specific as database supports. | type="Timestamp" must be specified. |
TrueFalse | System.Boolean | DbType.AnsiStringFixedLength - 1 char either 'T' or 'F' | type="TrueFalse" must be specified. |
YesNo | System.Boolean | DbType.AnsiStringFixedLength - 1 char either 'Y' or 'N' | type="YesNo" must be specified. |
还不快抢沙发