Type in the second part NHibernate

Source: Internet
Author: User

NHibernate type,. NET type, database field type mapping relationship

Because the NHibernate type and C # data types are corresponding, they are also categorized as value types and reference types, and there are several special classes that we describe separately:

  --Value type | What you should know is that value types are inherited from System.ValueType

NHibernate type . NET Types database field type Note
Ansichar or Char Char CHAR (n)
Boolean Boolean Boolean
Byte Byte Byte
Date Datetime Date Declaration type= "Date" must be displayed
Datetime Datetime Datetime Database fields Ignore milliseconds
DateTime2 Datetime DateTime2 Declaration type= "DateTime2" must be displayed
Decimal Decimal Decimal
Double Double Double
Guid Guid Guid
Int16 Int16 Int16
Int32 Int32 Int32
Int64 Int64 Int64
Single Single Single
Ticks Datetime Int64 The specified type= "Ticks" must be displayed
Time Datetime Time The specified type= "time" must be displayed
Timeastimespan TimeSpan Time The specified type= "Timeastimespan" must be displayed
TimeSpan TimeSpan Int64
TrueFalse or Yesno Boolean char (1) t/f or y/n The specified type= "TrueFalse" or type= "YesNo" must be displayed

Some of the less common are not listed, taking into account the limited support of some database issues, the increase in distress, or not listed.

--Reference type | What you should know is that value types are inherited from System.Object

NHibernate type . NET Types database field type Describe
Binary Byte[] Binary
String String String

--A few special types

NHibernate . NET Types database field type Describe
Binaryblob Byte[] Binary
Stringclob String String

Type in the second part NHibernate

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.